#what makes i=1 +- x * y special?

57 messages · Page 1 of 1 (latest)

river cedar
#

i hope someone might be able to help me out here, i am studying for an entry exam to a university and the book says that: [i=1] ... Z(i) = (Z(i-1) + 5) mod 11 = 1
how do i get 1 as the first answer rather than 5?
it makes even less sense when i increment the number to two and get the actual answer of mod 6 because i am obviously doing the exact same calculation and its true from any point onward that is not i=1, what makes 1 special? am i wrong? is the book wrong?
Z(i) = (Z(i-1) * 21 + 17) mod 40 also yields the same result where for i=1 the book states mod is also 1 and i am not sure how it could possibly be anything but 17
any help is greatly appreciated!!! i am genuinely extremely confused'

edit: Z(0) = 1
edit 2: wolfram alpha agrees on the 17 ???? (second calculation)
edit 3: plugging in 41 on the second calculation is supposedly also 1 rather than 17

unborn furnaceBOT
#
  1. Do not ping the Moderators, unless someone is breaking the rules.
  2. Do not ping the Helper Moderators, unless there is a conflict between helpers.
  3. Do not ping other members randomly for help.
  4. Ask your question and show the work you've done so far. If you've posted a screenshot of a question, specify which part you need help with.
  5. Wait patiently for a helper to come along.
  6. If the Helper has answered your question, remember to thank them with the Mathematics Ranks bot and close the thread with:

+close
Feel free to nominate the person for helper of the week in #helper-nominations
If you're happy with the help you got here, and the server overall, you can contribute financially as well:

arctic basin
#

Hey your question is a bit confusing, would it be possible for you to transcribe the question?

river cedar
#

source material is german therefore i think posting the book wouldnt really be of help. the most concise way to put it would be (1-1) * 21 + 17 mod 40 = 1 according to the book whereas wolfram alpha and myself would get 17. the topic is a random number generator. the starting number always yields 1 as the result according to the book, which both states that (1-1) * 21 + 17 mod 40 = 1 as well as (1-1) + 5) mod 11 = 1

arctic basin
#

is this modulo the CS modulo?

#

like mod operation?

river cedar
#

the book then goes on to list all the results for (i-1) * 21 + 17) mod 40, and every answer except for the very first are correct, apart from every time the number loops, so when you set i = 41, the expected result would again be 17 but the book says its 1

#

yes it is

arctic basin
#

oooooooh best not use this notation on a mathematics subreddit then

#

subreddit

#

lmao

#

server

river cedar
#

i dont know any other notation yet, its for the entry exam which is why this is stressing me out so much hahaha

#

what would the CS notation be?

arctic basin
#

The CS notation perhaps would be using a percent sign

#

it's inconsistent ngl

#

I usually understand via context

river cedar
#

i also looked up online videos related to the subject and nowhere else except in the book is the first result/starting point of the loop always 1, so i have to assume the book is just wrong?

arctic basin
#

or because I only work in a part of math where mod only means one thing

river cedar
#

thanks for the heads up!

arctic basin
#

also how is the title of the thread related to the question here?

#

doesn't seem particularly connected

river cedar
arctic basin
#

fair enough

river cedar
#

the book being wrong is making me nervous because now i am not sure if the entry exam expects the real value or the value as given in the book

arctic basin
#

it's terribly annoying that most of these mistakes and misprints/lack of clarity exist especially at stages of life where you have no recourse such as entrance exams

river cedar
#

there were some reviews online about the book having minor errors but thats especially annoying here since i am just going to assume we will have to calculate this by hand which takes a huge amount of time without guaranteeing any good results with an objectively correct answer, but it should be fine considering the amount of people that get in and drop out immediately cause they dont actually like the subject

#

i think i will close this in an hour or so to leave some room for someone coming in and explaining that i am wrong in some way

arctic basin
#

I hope you are, I sure know it would be more satisfying for you than whatever this is looking like

river cedar
#

yeah thats exactly how i feel hahahaha

tame pawn
#

Wait, what "1st answer"?

#

It looks like Z is a function, and it's defined recursively, but there is no initial value.

#

If you're saying Z(1) = 1, that's not saying (1 - 1) + 5 == 1 (mod 11).

#

It's just defining Z(1) to be 1.

#

Because Z is recursive, so you need to define it explicitly at some value.

#

So then Z(2) = (Z(2 - 1) + 5) mod 11 = (Z(1) + 5) mod 11 = (1 + 5) mod 11 = 6 mod 11 = 6

tame pawn
#

Z(i - 1) is a different thing from i - 1.

tame pawn
#

Which actually results in: Z(3) = (Z(3 - 1) + 5) mod 11 = (Z(2) + 5) mod 11 = (6 + 5) mod 11 = 11 mod 11 = 0Which is not equal to ((3 - 1) + 5) mod 11 = (2 + 5) mod 11 = 7 mod 11 = 7.

river cedar
# tame pawn Which actually results in:``` Z(3) = (Z(3 - 1) + 5) mod 11 = (Z(2) + 5) mod...

yeah thats correct, as is ur answer above, if i could just post the books quote i would but its not gonna help since its all in german with the only part thats not in german being the exact formula i wrote unfortunately. i get the same results as you in both your examples, i exclusively get a different result for i=1 because no matter the function given the book assumes the end result to be 1 eventhough that is objectively not true, i cross checked that with other youtube videos that explained how RNG works and none of the programs written ever just give 1 as an answer for every i=1

#

i therefore think the books author just did an oopsie

#

i just wonder how thats part of the 4th iteration of the book and if everybody before me just assumed that to be true

tame pawn
#

Z(i) is defined in terms of Z(i - 1).

tame pawn
#

Like, prove what Z(1) is.

river cedar
#

idk how to mathematically prove what Z(1) is, yes it is a recursive function. it is a recursive function to generate a random number. Z stands for Zufallszahl which literally translates to random number. "i" is the iteration, starting not from zero but from one, incrementing each iteration by 1

river cedar
#

+close

edgy lanternBOT
# river cedar +close
Please thank your Helpers before closing!

Please thank the helpers who assisted you by clicking the buttons below. You can thank each helper only once. Once you're done, click "Close Post" to close this thread.

edgy lanternBOT
# edgy lantern

Thank you for your feedback! Fate Salesman has been awarded 1 helper_points. They now have 1 helper_points. They have 3 helper_points daily left for today.

tame pawn
vestal mulch
#

At that point just make the entire message italics

vestal mulch
edgy lanternBOT
#

@river cedar

:HelpIcon:| Help Reminder

Hello m87.bpd, this is a friendly reminder that your help request has been inactive for more than 24 hours. If you no longer need assistance, please consider closing the thread using the +close command. This thread will be automatically closed in 3 days if it remains inactive.