Jump to content


Welcome to BrainDen.com - Brain Teasers Forum

Welcome to BrainDen.com - Brain Teasers Forum. Like most online communities you must register to post in our community, but don't worry this is a simple free process. To be a part of BrainDen Forums you may create a new account or sign in if you already have an account.
As a member you could start new topics, reply to others, subscribe to topics/forums to get automatic updates, get your own profile and make new friends.

Of course, you can also enjoy our collection of amazing optical illusions and cool math games.

If you like our site, you may support us by simply clicking Google "+1" or Facebook "Like" buttons at the top.
If you have a website, we would appreciate a little link to BrainDen.

Thanks and enjoy the Den :-)
Guest Message by DevFuse
 

Photo
- - - - -

Diamond Subtraction


Best Answer BobbyGo, 10 May 2013 - 08:38 PM

Spoiler for

Go to the full post


  • Please log in to reply
11 replies to this topic

#1 BMAD

BMAD

    Senior Member

  • Members
  • PipPipPipPip
  • 1694 posts
  • Gender:Female

Posted 10 May 2013 - 07:11 PM

Put four different whole numbers from 1 to 49, in the corners, then subtract the smaller from the larger and put the answers in between. Keep doing this until all four numbers become equal. How many steps can you make it last? The demo is "(14, 30, 18, 37) lasts 3 steps (don't count the step where they produce the same number)."  Find the longest lasting case.

 

 

DEMO:

stage 0

14  30           ---->           30-14

                                 37-14     30-18

37  18                              37-18

 

stage 1

   16                            16-13      16-12   

13   12  

    19                           19-13      19-12    

 

stage 2

3      4

 

6      7

 

stage 3

     1

3        3

     1

 

Stage 4 is stasis so it doesn't count


  • 0

#2 bonanova

bonanova

    bonanova

  • Moderator
  • PipPipPipPip
  • 5881 posts
  • Gender:Male
  • Location:New York

Posted 10 May 2013 - 08:26 PM

Spoiler for Just to be sure

  • 0
The greatest challenge to any thinker is stating the problem in a way that will allow a solution.
- Bertrand Russell

#3 BobbyGo

BobbyGo

    Advanced Member

  • Members
  • PipPipPip
  • 131 posts
  • Gender:Male

Posted 10 May 2013 - 08:38 PM   Best Answer

Spoiler for


  • 0

#4 bonanova

bonanova

    bonanova

  • Moderator
  • PipPipPipPip
  • 5881 posts
  • Gender:Male
  • Location:New York

Posted 10 May 2013 - 09:09 PM

Spoiler for

 
Spoiler for Here is my count for your case

  • 0
The greatest challenge to any thinker is stating the problem in a way that will allow a solution.
- Bertrand Russell

#5 dark_magician_92

dark_magician_92

    Advanced Member

  • Members
  • PipPipPip
  • 382 posts

Posted 10 May 2013 - 09:38 PM

Spoiler for

Can you share the code?


  • 0

#6 BobbyGo

BobbyGo

    Advanced Member

  • Members
  • PipPipPip
  • 131 posts
  • Gender:Male

Posted 10 May 2013 - 10:18 PM


Can you share the code?

 

 

I'm sure there are more elegant ways of coding this, and it only gives back the first longest set it finds (it won't return 8,21,45,1 after it finds 1,8,21,45) so I'm sure there is more than one answer.

Spoiler for code

  • 0

#7 BobbyGo

BobbyGo

    Advanced Member

  • Members
  • PipPipPip
  • 131 posts
  • Gender:Male

Posted 10 May 2013 - 10:49 PM

Just realized the section:

 

a1=sqrt ((a2-b2)*(a2-b2));

b1=sqrt ((c2-b2)*(c2-b2));

c1=sqrt ((c2-d2)*(c2-d2));

d1=sqrt ((a2-d2)*(a2-d2));

 

should actually be:

 

a1=sqrt ((a2-d2)*(a2-d2));

b1=sqrt ((a2-b2)*(a2-b2));

c1=sqrt ((c2-b2)*(c2-b2));

d1=sqrt ((c2-d2)*(c2-d2));

 

I don't think it really it effects the outcome, since it stayed in the same order.  But still.

 


  • 0

#8 BMAD

BMAD

    Senior Member

  • Members
  • PipPipPipPip
  • 1694 posts
  • Gender:Female

Posted 11 May 2013 - 12:46 AM

Spoiler for Just to be sure

yes, your example is 2 steps.


  • 0

#9 BMAD

BMAD

    Senior Member

  • Members
  • PipPipPipPip
  • 1694 posts
  • Gender:Female

Posted 11 May 2013 - 12:47 AM

Spoiler for Just to be sure

my example though shows 3 steps


  • 0

#10 BMAD

BMAD

    Senior Member

  • Members
  • PipPipPipPip
  • 1694 posts
  • Gender:Female

Posted 11 May 2013 - 12:56 AM

Spoiler for

Anything special about these numbers?


  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users