November 29th, 2016, 01:42 PM  #1 
Newbie Joined: Nov 2016 From: Slovensko Posts: 6 Thanks: 0  Algorithm Problem
Mario came to class, wiped the blackboard and wrote on it the numbers 1 to 50, each exactly once. Kaja is going to play with these numbers. Exactly 49 times repeats the following procedure: chooses any two numbers on board, she erases both of them, and then on the board writes the value of difference. So if you erased the numbers x and y, back write the number  x  y , i.e. the absolute value of the difference. During the game, it may happen that it will be written on the board several times the same number. For example, if Kaja right from the start erase numbers 6 and 9, writes on the blackboard No. 3. At that time, therefore, will be on board two threes. If then erased two threes, she wrote it instead on the board number 0. A) Does Kaja know to play the game so that it in the end remained on the board number 14? If so, how? If not, why? B) Find absolutely all possible values that can be the end of the game on the board. Of course, substantiate your claim. (Can you really make each of these values and how? And can you really not make any other already? Why?) Last edited by skipjack; November 30th, 2016 at 03:39 AM. 
November 30th, 2016, 01:31 AM  #2 
Senior Member Joined: Feb 2012 Posts: 144 Thanks: 16 
For the first question, I give you a hint: at the start of the game the sum of all numbers is 50*51/2=1275. Try to see how this sum changes when one step is performed.

November 30th, 2016, 08:33 AM  #3 
Newbie Joined: Nov 2016 From: Slovensko Posts: 6 Thanks: 0 
I found out that if i for example erase 50 and 1 i get 49 then i take a sum  difference (501) And i get even number and when i take for example now 49 and 2 i get 47 and when i again minus it from sum i get odd number.

December 1st, 2016, 06:35 AM  #4 
Newbie Joined: Nov 2016 From: Slovensko Posts: 6 Thanks: 0 
And i found out there is 25 odd and 25 even numbers. And i somehow know that whatever do there will be always at the end odd number. But i have to prove it somehow. Can you help me ?

December 1st, 2016, 09:35 AM  #5 
Newbie Joined: Nov 2016 From: Slovensko Posts: 6 Thanks: 0 
Please i need fast help


Tags 
algorithm, problem 
Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Gomory algorithm one step problem  sqad  Elementary Math  1  January 6th, 2016 05:55 PM 
Combinatorial algorithm problem .  jim198810  Computer Science  1  May 26th, 2015 11:48 AM 
Can anyone give a SAXPY Algorithm for this problem?  mthnum  Applied Math  0  February 25th, 2014 06:28 AM 
Middle Square Algorithm problem  unm  Number Theory  4  December 3rd, 2012 11:50 AM 
Simplex Algorithm problem  Snigger  Linear Algebra  1  May 27th, 2010 07:01 PM 