polishing game, Computer Engineering

Assignment Help:
Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various luminous jewels of particular colour. Necklaces require polishing the jewels. Operationally, all jewels of the same colour can be polished in one sitting.

Damjibhai and Shamjibhai are two jeweler friends. They decide to play a simple game. The game comprises of removing the jewels for polishing, turn by turn. Once a jewel is removed from the necklace, all other jewels of the same colour are assumed to be removed for polishing from the necklace. The player who polished the most jewels, wins. Damjibhai being more senior, always gets a chance to play first (remove jewel from necklace first). If both players play optimally, find out if Damjibhai can win. The following are the rules of their game
Jewels can only be removed for polishing from either end of the necklace (i.e. head or tail)
Once a jewel type is removed from the necklace, all other instances of the same jewel type is treated as polished by the person who removed the jewel
For purpose of this problem, we have represented the necklace as a string and each character of the string is a Luminous Jewel

Related Discussions:- polishing game

No class can derive, Make a console application. Add class 'Account' having...

Make a console application. Add class 'Account' having variables as num (integer) name (String), bal (double), ac_code (byte). Describe four different constructors to initialize th

Physics, what is fresnel''s biprism?how it is used to determine wavelength ...

what is fresnel''s biprism?how it is used to determine wavelength of monochromatic source of light

Find the conversion time & conversion rate of A/D converter, Find the conve...

Find the conversion time of a Successive Approximation A/D converter which uses a 2 MHz clock and a 5-bit binary ladder containing 8V reference. What is the Conversion Rate? An

Why use a DTD (Document Type Definition), Why use a DTD ( Document Type Def...

Why use a DTD ( Document Type Definition )? XML gives an application independent method of sharing data. Along with a DTD, independent group of people can agree to employ a com

Explain host function, Explain Host function Host function: accepts nam...

Explain Host function Host function: accepts name of floating-point guest function with single floating-point argument as its first argument, evaluates this function at x (the

Explain the types of hardware used in supermarkets, Explain the types of ha...

Explain the types of hardware used in supermarkets These use many types of specialist I/O hardware. For instance: -  Bar code readers/scanners (to read product details and e

How are comparisons done in 8086 assembly language, Q. How are comparisons ...

Q. How are comparisons done in 8086 assembly language? There is a compare instruction CMP. Though this instruction just sets the flags on comparing two operands (both 16 bits

Analysis of merge sort, i) The width of the sorting + merging circuit is eq...

i) The width of the sorting + merging circuit is equivalent to maximum number of devices needed in a phase is O(n/2). As in the above diagram maximum number of devices for a given

What is canonical and standard forms, Q.What is Canonical and Standard Form...

Q.What is Canonical and Standard Forms? An algebraic expression can express in two forms: i) Sum of Products   (SOP) for example (A . B¯) + (A¯ . B¯)            ii) Produ

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd