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: 3.0000 (2 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:
Login:
Password:
Remember me:
Sign up! | Forgot password


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

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information