flat assembler
Message board for the users of flat assembler.

Index > Heap > Numerical oddities

Goto page Previous  1, 2, 3 ... 18, 19, 20 ... 24, 25, 26  Next
Author
Thread Post new topic Reply to topic
Madis731



Joined: 25 Sep 2003
Posts: 2140
Location: Estonia
Madis731
You borrowed a thing X (so you actually had -1). The thief took it and left you with nothing. Now you have more Smile Like you said, fun!
Post 09 May 2012, 17:32
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17463
Location: In your JS exploiting you and your system
revolution
Madis731 wrote:
You borrowed a thing X (so you actually had -1). The thief took it and left you with nothing. Now you have more Smile Like you said, fun!
Hmm, I think that borrow does not work like that. If I borrow your laptop then I now have one laptop. The thief steals your laptop and now I have no laptop. I think that means that I now have less than what I previously had.
Post 09 May 2012, 22:03
View user's profile Send private message Visit poster's website Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
revolution wrote:
Madis731 wrote:
You borrowed a thing X (so you actually had -1). The thief took it and left you with nothing. Now you have more Smile Like you said, fun!
Hmm, I think that borrow does not work like that. If I borrow your laptop then I now have one laptop. The thief steals your laptop and now I have no laptop. I think that means that I now have less than what I previously had.

How ? The laptop is not yours you borrowed it. If you want to have your own then you'd have to buy two. One you can truly call yours and one to return to the owner.
Post 10 May 2012, 00:49
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17463
Location: In your JS exploiting you and your system
revolution
typedef wrote:
The laptop is not yours you borrowed it. If you want to have your own then you'd have to buy two. One you can truly call yours and one to return to the owner.
So this getting away from my little puzzle.

Back on topic, I think that borrowing of something is not part of the answer. This puzzle is more lateral than that.
Post 10 May 2012, 01:05
View user's profile Send private message Visit poster's website Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
Ya sorry I hadn't read your very previous post.

revolution wrote:

This one is for fun also, don't take it too seriously:
I have a particular amount of thing X.
A thief comes along and steals some of the amount.
Now I have more of thing X than I had before the thief came along.
How many of thing X did I start with and how many of thing X do I have now?

Here's my take:

You have X.
Thief steals Y.
Now, you're left w/ Z where Z > X - Y since some were stolen.

Here's the tricky part:
revolution wrote:
Now I have more of thing X than I had before the thief came along.


1. Assuming you replenished X by adding A you'll have started with Z + A = (X-Y) + A. You now simply have A + Z.
That was a more straight literal answer.

Now in math logic.
2. If you had X and the thief stole Y and you ended up with Z, where Z > X -Y, then X must have been <=0 and Y must have been <0. Exclusively either one of them was <=0 or <0, because if all were <=0 or <0 then there would not be the word some. Even if they were all the same value which still contradicts the problem, you'd end up with 0 which is not of any quantity.
Post 10 May 2012, 01:46
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17463
Location: In your JS exploiting you and your system
revolution
typedef wrote:
1. Assuming you replenished X by adding A you'll have started with Z + A = (X-Y) + A. You now simply have A + Z.
The assumption is not required or implied. If there was replenishment then I would have stated it.
Post 10 May 2012, 02:03
View user's profile Send private message Visit poster's website Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
revolution wrote:
typedef wrote:
1. Assuming you replenished X by adding A you'll have started with Z + A = (X-Y) + A. You now simply have A + Z.
The assumption is not required or implied. If there was replenishment then I would have stated it.


That is why I gave two solution cases. Wink
Post 10 May 2012, 02:33
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17463
Location: In your JS exploiting you and your system
revolution
Time for a hint then:

You don't need to know what thing X is. It could be anything. Paper, currency, computers, clothing, water, etc.
Post 13 May 2012, 02:54
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6038
Location: Poland
MHajduk
revolution wrote:
This one is for fun also, don't take it too seriously:
  1. I have a particular amount of thing X.
  2. A thief comes along and steals some of the amount.
  3. Now I have more of thing X than I had before the thief came along.
  4. How many of thing X did I start with and how many of thing X do I have now?
I'm not taking your question too seriously, so I can answer this way:
  1. A thief has a particular amount of thing X (maybe 0).
  2. The thief comes along and steals some of the amount.
  3. Now the thief has more of thing X than the thief had before the thief came along.
Even if my answer is completely wrong I had much fun with it. Razz
Post 13 May 2012, 10:01
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17463
Location: In your JS exploiting you and your system
revolution
MHajduk wrote:
I'm not taking your question too seriously, so I can answer this way:
  1. A thief has a particular amount of thing X (maybe 0).
  2. The thief comes along and steals some of the amount.
  3. Now the thief has more of thing X than the thief had before the thief came along.
Even if my answer is completely wrong I had much fun with it. Razz
Indeed, I had considered this answer (the thief and I being the same person) when I first thought of this puzzle. That is specifically why I added the fourth step. But of course it is hard to make a convincing argument about stealing something from oneself.
Post 13 May 2012, 10:55
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6038
Location: Poland
MHajduk
I don't think that this particular thief stole anything from himself / herself. The clue is in the phrase "comes along" and how we can interpret it. Wink
Post 13 May 2012, 11:01
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17463
Location: In your JS exploiting you and your system
revolution
MHajduk wrote:
I don't think that this particular thief stole anything from himself / herself. The clue is in the phrase "comes along" and how we can interpret it. Wink
Well I supposed the collection of things X could be stored in some remote place. Anyhow, rather than trying to deal with various syntactical and grammatical peculiarities I though it would just be easiest to ask for hard numbers to support any proposed answer. Wink
Post 13 May 2012, 11:03
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6038
Location: Poland
MHajduk
Talking about numbers, I have thought about arithmetic modulo some number n.

You have a set of non-negative integer numbers {0, 1, ..., n-1} (rests of division modulo n). If you assume X=0, and "steal", i.e. subtract some k≠m*n (where k and m are integers) from X modulo n, you'll get a number (rest) that is not equal to 0, hence greater than 0. Wink
Post 13 May 2012, 11:13
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17463
Location: In your JS exploiting you and your system
revolution
MHajduk wrote:
Talking about numbers, I have thought about arithmetic modulo some number n.

You have a set of non-negative integer numbers {0, 1, ..., n-1} (rests of division modulo n). If you assume X=0, and "steal", i.e. subtract some k≠m*n (where k and m are integers) from X modulo n, you'll get a number (rest) that is not equal to 0, hence greater than 0. Wink
So with that can you conclusively answer the question in part 4 with specific numbers?

BTW: You are on the wrong track here. Sorry.
Post 13 May 2012, 12:09
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6038
Location: Poland
MHajduk
revolution wrote:
MHajduk wrote:
Talking about numbers, I have thought about arithmetic modulo some number n.

You have a set of non-negative integer numbers {0, 1, ..., n-1} (rests of division modulo n). If you assume X=0, and "steal", i.e. subtract some k≠m*n (where k and m are integers) from X modulo n, you'll get a number (rest) that is not equal to 0, hence greater than 0. Wink
So with that can you conclusively answer the question in part 4 with specific numbers?
X = 0

X - 1 = 0 - 1 ≡ n - 1 (mod n)

So you start with 0, "steal" one and get n - 1 > X modulo n.
Wink
Post 13 May 2012, 12:15
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17463
Location: In your JS exploiting you and your system
revolution
'n' is not a specific number. Smile Seems rather arbitrary to me. Wink
Post 13 May 2012, 12:17
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6038
Location: Poland
MHajduk
revolution wrote:
'n' is not a specific number. Smile Seems rather arbitrary to me. Wink
Take n = 2

X = 0

X - 1 = 0 - 1 ≡ 2 - 1 = 1 (mod 2)

1 > 0
Post 13 May 2012, 12:19
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17463
Location: In your JS exploiting you and your system
revolution
Why is n=2? How do you derive that?
Post 13 May 2012, 12:21
View user's profile Send private message Visit poster's website Reply with quote
MHajduk



Joined: 30 Mar 2006
Posts: 6038
Location: Poland
MHajduk
Our symbol n may be any positive integer number. You wanted an example, so I gave you the relatively simple one. Wink
Post 13 May 2012, 12:23
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17463
Location: In your JS exploiting you and your system
revolution
MHajduk wrote:
Our symbol n may be any positive integer number.
Right, so it is arbitrary. So I suggest that this cannot produce a specific result.
MHajduk wrote:
You wanted an example, so I gave you the relatively simple one.
Actually, I want a specific answer.
Post 13 May 2012, 12:25
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3 ... 18, 19, 20 ... 24, 25, 26  Next

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.