Hard!!!!!


by decibel
Tags: None
decibel
decibel is offline
#1
Jun4-04, 09:24 PM
P: 117
i cant seem to be able to beat this guy...and to tell u thr truth, i feel like going in my computer screen and punching him in the face, lets see if any of u can get this , cause i certainly cant

http://www.ebaumsworld.com/pearl.shtml
Phys.Org News Partner Science news on Phys.org
SensaBubble: It's a bubble, but not as we know it (w/ video)
The hemihelix: Scientists discover a new shape using rubber bands (w/ video)
Microbes provide insights into evolution of human language
AKG
AKG is offline
#2
Jun4-04, 09:39 PM
Sci Advisor
HW Helper
P: 2,589
There are a couple ways of beating him. You can figure it out on your own if you use some brute force, listing out a bunch of the possibilities at a given stage, and some logic, eliminating some of the many possibilities. Start from the final desired state, and work your way backwards. After going down the "tree" 4 or 5 levels, you'll have a lot of different possibilities to work with, but by then you should be able to see what works and what doesn't. That was my way, there's a nicer, neater, more general way to solve this, and here it goes:

Write the number of pearls in each line in binary, so starting with 3, 4, 5, 6, you have:
0011
0100
0101
0110

Now, add each column up, one column at a time, modulo 2. In other words, at the bottom of each column, write a 1 if there are an odd number of 1s in the column above, and a 0 if there are an even number, like so:

0011
0100
0101
0110
-----
0100

Now, whenever it's your turn, your goal is to always have that "sum" (like 0100 in this case) to be all zeroes. If you remove 4 pearls from the row of 4, 5, or 6, you'll get:

0011
0000
0101
0110

OR

0011
0100
0001
0110

OR

0011
0100
0101
0010

However! This only takes you so far. Once the number of pearls gets small, this approach breaks down. Imagine you've left it with 2 rows, each containing 1:

0000
0000
0001
0001
----
0000

Looks good, right? Wrong. Obviously, that guy will just take 1, leaving you with 1 and you lose.
TALewis
TALewis is offline
#3
Jun4-04, 09:39 PM
P: 200
I hate playing games like that, especially with a computer, because there's probably some algorithm that makes winning trivial for those who know (or who are programmed with) the trick.

AKG
AKG is offline
#4
Jun4-04, 09:42 PM
Sci Advisor
HW Helper
P: 2,589

Hard!!!!!


Yup, once you figure it out, winning is trivial. However, there is some fun in figuring out the algorithm/heuristics that make the winning trivial.
decibel
decibel is offline
#5
Jun4-04, 09:55 PM
P: 117
i've learnd about binary a few years ago in computer class..but i dont remember it...gotta look thru my notes :D


Register to reply

Related Discussions
Differential equation: y'-y=(1/2)x-1 Differential Equations 7
2 hard 4 me. Engineering, Comp Sci, & Technology Homework 1
physics B problems :( hard hard Introductory Physics Homework 4
Projectory: Super Hard Apparently From The Military!!!!!!! Gah Hard Introductory Physics Homework 1
Very hard... Introductory Physics Homework 2