All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Algorithms
Number machine problem 2 (Posted on 2014-12-02) Difficulty: 2 of 5
I have a number machine. I say x gives y if when x goes in, y comes out. For any numbers x and y, by "xy" I mean x followed by y. Here are my two rules.

1x gives x.
For example, 13 gives 3.
If x gives y, then 2x gives yy.
For example, 213 gives 33 since 13 gives 3.

Show that for any number a, there is a number x such that x gives ax.

See The Solution Submitted by Math Man    
Rating: 4.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts possible solution Comment 3 of 3 |

It's about strings really.

The effect of the two instructions is:
If a nunber string begins with '21', then crop the first two digits and duplicate the rest ('y' and 'y')

String '21a' therefore gives 'a' and 'a'.
So for any number a, x =  21a21 gives 'a' and '21a21' = a and x

  Posted by broll on 2014-12-04 01:26:07
Please log in:
Remember me:
Sign up! | Forgot password

Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (1)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Copyright © 2002 - 2018 by Animus Pactum Consulting. All rights reserved. Privacy Information