Wikipedia:Reference desk/Mathematics
of the Wikipedia reference desk.
Main page: Help searching Wikipedia
ย ย ย
How can I get my question answered?
- Select the section of the desk that best fits the general topic of your question (see the navigation column to the right).
- Post your question to only one section, providing a short header that gives the topic of your question.
- Type '~~~~' (that is, four tilde characters) at the end โ this signs and dates your contribution so we know who wrote what and when.
- Don't post personal contact information โ it will be removed. Any answers will be provided here.
- Please be as specific as possible, and include all relevant context โ the usefulness of answers may depend on the context.
- Note:
- We don't answer (and may remove) questions that require medical diagnosis or legal advice.
- We don't answer requests for opinions, predictions or debate.
- We don't do your homework for you, though we'll help you past the stuck point.
- We don't conduct original research or provide a free source of ideas, but we'll help you find information you need.
How do I answer a question?
Main page: Wikipedia:Reference desk/Guidelines
- The best answers address the question directly, and back up facts with wikilinks and links to sources. Do not edit others' comments and do not give any medical or legal advice.
November 16
Any logical sequence for this...
One wants to find out certain numbers between 123456 and 654321. The numbers should be allย :
- Not containg any digit above 6
- No digit should occur more than once. (for example 154236 is OK, but not 154266)
What number should be added (which will be a different number each time. For example, since first "next" number will be 123465, which we'll get by adding 9, but next one will be gotten by adding 81, which will be 123546).
But how to get the next one satisfying above two conditionsย ? ย Jon Asctonย ย (talk) 05:51, 16 November 2017 (UTC)
- XY problem alert: I suspect what you are actually looking for is a way to enumerate permutations, so that you do not really care about storing them as integers.
- [1] has some algorithms. [2] gives a few implementations in Python. Some of them enumerate in lexicographic order (= increasing order when the permutations are stored as the digits of a number). TigraanClick here to contact me 09:40, 16 November 2017 (UTC)
- Is the digit 0 allowed? If not, there should be 6!=720 numbers which meet the condition. If yes, there should be 7!-1=5039 (in both cases including the boundary numbers). --Stephan Schulz (talk) 09:45, 16 November 2017 (UTC)
- No, I'm afraid 0 isn't allowed. Of course, the number of numbers we'll get will be 6!. Yeah, boundary numbers, both 123456 and 654321 will be part of the numbers selected, smallest and biggest respectively. Both meet the conditions: no digit of no digit being <1 or >6, or digit-repeted. Kindly elaborate if you see a problem there: ย Jon Asctonย ย (talk) 11:20, 16 November 2017 (UTC)
- For Tigraan: OK, pal, let's revise it (in hope that it won't be an XY problem anymore). Say the problem is all:-
One wants to find out certain numbers between 123456 and 654321. Each of numbers shouldย :
- Not contain any digit above 6
- No digit should occur more than once. (for example 154236 is OK, but not 154266)
- None should have 0 in it.
What number should be added (which will be a different number each time.
What number should be added (which will be a different number each time. For example, since first "next" number will be 123465, which we'll get by adding 9, but next one will be gotten by adding 81, which will be 123546) ย Jon Asctonย ย (talk) 11:20, 16 November 2017 (UTC)
- Yawn. Well, this does not look like a homework problem, and it is simple enough that Iย can just blurt out the solution, Iย guess. The following Python script solves the problem:
import itertools
def tuple_into_num(l):
N=len(l)
res=0
for i in range(N):
res += l[i]*10**(N-1-i)
return res
gen=itertools.permutations([1,2,3,4,5,6])
for item in gen:
print(tuple_into_num(item))
- Resulting blob:
All permutations of [1,2,3,4,5,6] (in integer form)
|
---|
123456 123465 123546 123564 123645 123654 124356 124365 124536 124563 124635 124653 125346 125364 125436 125463 125634 125643 126345 126354 126435 126453 126534 126543 132456 132465 132546 132564 132645 132654 134256 134265 134526 134562 134625 134652 135246 135264 135426 135462 135624 135642 136245 136254 136425 136452 136524 136542 142356 142365 142536 142563 142635 142653 143256 143265 143526 143562 143625 143652 145236 145263 145326 145362 145623 145632 146235 146253 146325 146352 146523 146532 152346 152364 152436 152463 152634 152643 153246 153264 153426 153462 153624 153642 154236 154263 154326 154362 154623 154632 156234 156243 156324 156342 156423 156432 162345 162354 162435 162453 162534 162543 163245 163254 163425 163452 163524 163542 164235 164253 164325 164352 164523 164532 165234 165243 165324 165342 165423 165432 213456 213465 213546 213564 213645 213654 214356 214365 214536 214563 214635 214653 215346 215364 215436 215463 215634 215643 216345 216354 216435 216453 216534 216543 231456 231465 231546 231564 231645 231654 234156 234165 234516 234561 234615 234651 235146 235164 235416 235461 235614 235641 236145 236154 236415 236451 236514 236541 241356 241365 241536 241563 241635 241653 243156 243165 243516 243561 243615 243651 245136 245163 245316 245361 245613 245631 246135 246153 246315 246351 246513 246531 251346 251364 251436 251463 251634 251643 253146 253164 253416 253461 253614 253641 254136 254163 254316 254361 254613 254631 256134 256143 256314 256341 256413 256431 261345 261354 261435 261453 261534 261543 263145 263154 263415 263451 263514 263541 264135 264153 264315 264351 264513 264531 265134 265143 265314 265341 265413 265431 312456 312465 312546 312564 312645 312654 314256 314265 314526 314562 314625 314652 315246 315264 315426 315462 315624 315642 316245 316254 316425 316452 316524 316542 321456 321465 321546 321564 321645 321654 324156 324165 324516 324561 324615 324651 325146 325164 325416 325461 325614 325641 326145 326154 326415 326451 326514 326541 341256 341265 341526 341562 341625 341652 342156 342165 342516 342561 342615 342651 345126 345162 345216 345261 345612 345621 346125 346152 346215 346251 346512 346521 351246 351264 351426 351462 351624 351642 352146 352164 352416 352461 352614 352641 354126 354162 354216 354261 354612 354621 356124 356142 356214 356241 356412 356421 361245 361254 361425 361452 361524 361542 362145 362154 362415 362451 362514 362541 364125 364152 364215 364251 364512 364521 365124 365142 365214 365241 365412 365421 412356 412365 412536 412563 412635 412653 413256 413265 413526 413562 413625 413652 415236 415263 415326 415362 415623 415632 416235 416253 416325 416352 416523 416532 421356 421365 421536 421563 421635 421653 423156 423165 423516 423561 423615 423651 425136 425163 425316 425361 425613 425631 426135 426153 426315 426351 426513 426531 431256 431265 431526 431562 431625 431652 432156 432165 432516 432561 432615 432651 435126 435162 435216 435261 435612 435621 436125 436152 436215 436251 436512 436521 451236 451263 451326 451362 451623 451632 452136 452163 452316 452361 452613 452631 453126 453162 453216 453261 453612 453621 456123 456132 456213 456231 456312 456321 461235 461253 461325 461352 461523 461532 462135 462153 462315 462351 462513 462531 463125 463152 463215 463251 463512 463521 465123 465132 465213 465231 465312 465321 512346 512364 512436 512463 512634 512643 513246 513264 513426 513462 513624 513642 514236 514263 514326 514362 514623 514632 516234 516243 516324 516342 516423 516432 521346 521364 521436 521463 521634 521643 523146 523164 523416 523461 523614 523641 524136 524163 524316 524361 524613 524631 526134 526143 526314 526341 526413 526431 531246 531264 531426 531462 531624 531642 532146 532164 532416 532461 532614 532641 534126 534162 534216 534261 534612 534621 536124 536142 536214 536241 536412 536421 541236 541263 541326 541362 541623 541632 542136 542163 542316 542361 542613 542631 543126 543162 543216 543261 543612 543621 546123 546132 546213 546231 546312 546321 561234 561243 561324 561342 561423 561432 562134 562143 562314 562341 562413 562431 563124 563142 563214 563241 563412 563421 564123 564132 564213 564231 564312 564321 612345 612354 612435 612453 612534 612543 613245 613254 613425 613452 613524 613542 614235 614253 614325 614352 614523 614532 615234 615243 615324 615342 615423 615432 621345 621354 621435 621453 621534 621543 623145 623154 623415 623451 623514 623541 624135 624153 624315 624351 624513 624531 625134 625143 625314 625341 625413 625431 631245 631254 631425 631452 631524 631542 632145 632154 632415 632451 632514 632541 634125 634152 634215 634251 634512 634521 635124 635142 635214 635241 635412 635421 641235 641253 641325 641352 641523 641532 642135 642153 642315 642351 642513 642531 643125 643152 643215 643251 643512 643521 645123 645132 645213 645231 645312 645321 651234 651243 651324 651342 651423 651432 652134 652143 652314 652341 652413 652431 653124 653142 653214 653241 653412 653421 654123 654132 654213 654231 654312 654321 |
- Wonderfulย ! You got all those numbers by writing so small a codingย ! And if I tried it using VB6 (my obsession) I had to write at least 20 times if not more than that. Guess, must learn this blackmagic called Python...ย Jon Asctonย ย (talk) 14:01, 16 November 2017 (UTC)
- Tigraan is being so verbose. This also works:
import itertools
gen=itertools.permutations([1,2,3,4,5,6])
for line in gen:
print("".join([str(item) for item in line]))
- Dragons flight (talk) 14:45, 16 November 2017 (UTC)
- Maybe I'm too anal, but that last line should be
- Dragons flight (talk) 14:45, 16 November 2017 (UTC)
print(int("".join([str(item) for item in line])))
.
- The OP asked for numbers, not strings that happen to be decimal representations of numbersย ;-). --Stephan Schulz (talk) 15:31, 16 November 2017 (UTC)
- How can we give him a number instead of some form of representation of that number? I feel that I am in the border between mathematics and philosophy! -- Q Chris (talk) 15:47, 16 November 2017 (UTC)
- Well, as long as the number is printed, the difference is philosophical. But assuming the OP wants to do something with the numbers inside the program, the type matters. In Python, a string and an int have different types with different properties, and, more importantly, different operations. --Stephan Schulz (talk) 16:15, 16 November 2017 (UTC)
- How can we give him a number instead of some form of representation of that number? I feel that I am in the border between mathematics and philosophy! -- Q Chris (talk) 15:47, 16 November 2017 (UTC)
- Well, I would have written a shorter script but Iย did not have the time. I would probably have taken more time finding how to avoid the t-uple to int routine than it took writing it. And even inside it, I was pretty sure when writing the for loop than there was a more Pythonic option but did not care - for the interested reader:ย the untested
return sum(l[i]*10**(N-1-i) for i in range(N))
is a good candidate. - On the "philosophical" issue of what type to return, I saw a relevant comment something like five years ago on http://thedailywtf.com/ to the effect that "if you are not adding or multiplying them, they are not really numbers"; meaning a program should not use integers to store data that is not meant for arithmetics. Exhibit #1 was a front end display of a "phone number" field as "1.5579E10" or similar; a phone number is functionally a string, even if it is a string of digits.
- Here, we cannot read OP's mind and they did not tell what they are going to use the "integers" for, but the problem screams that those are permutations, not numbers, so the natural representation is probably an array/list. In those optics a string (= array of characters) is better than an int output (and worse than a list/t-uple output in Python). TigraanClick here to contact me 17:36, 16 November 2017 (UTC)
- You miss one important point. The OP was asking for numbers. So we should give him numbers. We don't know if he wants or needs numbers, but we should always follow rule number one of practical project management: The most important goal is not to succeed, but to make sure that the finger of blame is pointing in the right direction (i.e. away from youย ;-). --Stephan Schulz (talk) 07:58, 17 November 2017 (UTC)
- The OP asked also "what number should be added each time", i.e. to get each permutation from the one before (though they deleted that bit further down the dialogue). As a matter of interest, if the permutations are put in ascending order, is there any obvious pattern to these successive differences? โ217.43.234.32 (talk) 10:25, 17 November 2017 (UTC)
- I hand-hacked a script for the differences, and there are some regularities, but nothing obvious. I then entered the first few terms into the On-Line Encyclopedia of Integer Sequences and it came back with sequence A219664, which basically is a generalised form of the differences of the permutations sequence and has no particularly interesting properties listed. The original series, however, is at A178476, and that one has a link to A178475 (the same thing with digits 1-5), which lists a relatively efficient procedure for computing the nth element. BTW, I suspect it's a symptom of terminal nerd if you click around OEIS in the same way you click around Wikipedia... --Stephan Schulz (talk) 11:53, 17 November 2017 (UTC)
- Since the difference of any two permutations of a number given in base b is a multiple of b-1, it is reasonable to divide these first differences by 9 when seeking patterns. This yields OEIS:ย A217626, with interesting notes in the comments section. -- ToE 18:39, 20 November 2017 (UTC)
- The OP asked also "what number should be added each time", i.e. to get each permutation from the one before (though they deleted that bit further down the dialogue). As a matter of interest, if the permutations are put in ascending order, is there any obvious pattern to these successive differences? โ217.43.234.32 (talk) 10:25, 17 November 2017 (UTC)
- You miss one important point. The OP was asking for numbers. So we should give him numbers. We don't know if he wants or needs numbers, but we should always follow rule number one of practical project management: The most important goal is not to succeed, but to make sure that the finger of blame is pointing in the right direction (i.e. away from youย ;-). --Stephan Schulz (talk) 07:58, 17 November 2017 (UTC)
- The OP asked for numbers, not strings that happen to be decimal representations of numbersย ;-). --Stephan Schulz (talk) 15:31, 16 November 2017 (UTC)
November 21
Turning things inside out
Take a watch with a metal watchband, like the ones pictured here, and you can easily turn it inside out. Take a bottomless and topless paper tube (e.g. a cereal box with flaps opened) and you can't. What's the difference? Is it related to the fact that the diameter of the watchband circle is a good deal greater than the width (i.e. your arm's circumference is many cm, while the band is 1cm or 2cm wide) while the cereal box's interior diameter is a good deal larger than its circumference? I came here because this question reminds me of chatting with a former roommate about his topology-related Ph.D. dissertation, where he was talking about turning mugs inside out, or something like that. Nyttend backup (talk) 16:29, 21 November 2017 (UTC)
- I think it has more to do with the stiffness of the material. For example, if you take an empty bag of potato chips (made of paper or plastic) and open the bottom, it's fairly easy to turn it inside out, even though the dimensions are similar to those of the cereal box. On the other hand if the watchband were not flexible, but something like a rigid steel ring, it would not be possible to turn it inside out. This is not really a topological issue of course, because in topology the objects under consideration are assumed to be infinitely flexible and stretchable. CodeTalker (talk) 02:05, 22 November 2017 (UTC)
- [Edit conflict.] This is more a function of material property than geometry. A tube with a similar aspect ratio to you paper tube, but made out of more pliant material such as thin rubber (a quarter of a bicycle's innertube) or fabric (a sleeve cut from a long sleeve shirt or a sock with the toe cut open), could easily be everted. -- ToE 02:06, 22 November 2017 (UTC)
- Only tangentially related, but you may be interested in reading our sphere eversion article and watching the first video in ยง External links. Also, if you ever have an old bicycle tube to be discarded, first cut the valve out and then evert the punctured torus. (Some talcum powder may help the process.) This is described in ยง Topology, but it is very cool to see first hand, particular given the aspect ratio of an innertube. The end result is still a punctured torus, but of a very different appearance. -- ToE 02:06, 22 November 2017 (UTC)
- See [3] about turning a tube inside out. This is the tallest that has been done with rigid plates. Dmcq (talk) 12:17, 22 November 2017 (UTC)
November 24
Intersection of Hyperplance and Hypercube
Let (for ) be a hyperplane, and be a hypercube.
Does the intersection equal the convex hull of two -dimensional hypercubes? David Frid (talk) 12:52, 24 November 2017 (UTC)
- Even in the case of a 3-D cube you can get a hexagon by such a cut and you can't get six outside points as thehull of two lines with four end points in total. Dmcq (talk) 16:33, 24 November 2017 (UTC)
- Thank you David Frid (talk) 07:58, 25 November 2017 (UTC)
Maximum Distance
Let be the intersection of some hyperplane and hypercube. Let . Let ( denotes the Euclidean distance).
Does have a local maximum, which is not a global maximum too? David Frid (talk) 13:25, 24 November 2017 (UTC)
- You can have a local maximum which is not a global maximum. For instance just consider a plane intersecting a cube to give a square. The distance to the two far corners from a point near the middle of one side will be local maxima. On the other hand with the point close to one corner there will just be a single maximum to the opposite corner. Dmcq (talk) 16:39, 24 November 2017 (UTC)
- (edit conflict) Let n=2. The hypercube is a square (including the interior), and the hyperplane is a line intersecting the square in the line segment AB, with endpoints A and B on the squareโs boundary. Let P be a point in the plane such that its nearest point on AB is the point C = (2/3)A +(1/3)B. Then f has maxima at A and B with the global maximum at B. Loraof (talk) 16:45, 24 November 2017 (UTC)
- Thank you!
- What happens if we also assume that the hyperplane is for some , and the hypercube is , and is the hypercube's center.
- Under these extra assumptions, can we have a local maximum that is not a global maximum too? (the above examples do not apply for these extra assumptions)David Frid (talk) 07:45, 25 November 2017 (UTC)
- Yes lots. A plane going through p will have the origin and the farthest point of the hypercube from the origin as maxima. Some other plane going through the origin but just a little away from it will have a local maximum to a point near the farthest away point of the hypercube from the origin. Dmcq (talk) 22:04, 25 November 2017 (UTC)
Difficulty Simplying Terms in Lagrange Polynomial
I'm teaching myself Lagrange interpolation, and I can't seem to get the correct interpolating polynomial for the study exercises. I'm sure that I'm setting up the calculation correctly, but even with just 4 data points, the resulting expression is so complicated that I'm probably making mistakes when I simplify it. The data points are (-1,0), (2,1), (3,1), and (5,2). The resulting polynomial terms are:
By combining the first and third terms, I get:
Next, I find the LCD for that expression and the second term:
Adding and simplifying results in the expression:
However, the answer (from Wolfram Alpha) is:
Can anyone see where I'm making a mistake? OldTimeNESter (talk) 20:21, 24 November 2017 (UTC)
- Well, you're missing an term on the first step, so that'll throw things off at least. But overall, it would probably be easiest to simplify systematically: just multiply out each term and then combine them all together at the end (by factoring out 1/72). --Deacon Vorbis (talk) 20:40, 24 November 2017 (UTC)
- The simplest way is to note that there is a common factor in all three terms. Ruslik_Zero 20:57, 24 November 2017 (UTC)
- ... so take out a common factor of (x+1)โ72 at the start, then combine the quadratic terms: 8(x-3)(x-5) - 9(x-2)(x-5) + 4(...... There was nothing wrong with your original method except for the error in multiplying, but you might find it easier to start this way. Dbfirs 21:23, 24 November 2017 (UTC)
- The simplest way is to note that there is a common factor in all three terms. Ruslik_Zero 20:57, 24 November 2017 (UTC)
Shoot, Deacon Vorbis, you're right: I don't know how I missed that. I usually do just multiply everything out, too, but I was trying to do it in fewer steps to avoid making mistakes (like the one I did make!). OldTimeNESter (talk) 18:33, 25 November 2017 (UTC)
- I often make mistakes when I try to multiply out cubics (lack of practice), so combining terms with the factor outside makes errors less likely (for me at least). Dbfirs 23:02, 25 November 2017 (UTC)
November 25
Square root of complex numbers does not work
I found that the square root of complex numbers do not work. The proof is given as proof by contradiction.
- step 1. Calculate the sqrt( 1 + 0 i)
- step 2. Notice that the point 1 + 0 i is on the unit circle (on the complex plane)
- step 3. Calculate the square root via two paths simultaneously, the first path going anti-clockwise on the unit circle while the second path going clockwise on the unit circle.
- step 4. The two paths will meet at -1 + 0i but the value of the square root will differ depending on which path you take
- step 5. CONTRADICTION therefore the aquare root of complex number must be wrong.
Going anticlockwise around the unit circle I get this.
{{0 deg, 1.00}, {30 deg, 0.966 + 0.259 I}, {60 deg, 0.866 + 0.500 I}, {90 deg, 0.707 + 0.707 I}, {120 deg, 0.500 + 0.866 I}, {150 deg, 0.259 + 0.966 I}, {179 deg, 0.009 + 1.00 I}}
Going clockwise around the unit circle I get this.
{{0 deg, 1.00}, {-30 deg, 0.966 - 0.259 I}, {-60 deg, 0.866 - 0.500 I}, {-90 deg, 0.707 - 0.707 I}, {-120 deg, 0.500 - 0.866 I}, {-150 deg, 0.259 - 0.966 I}, {-179 deg, 0.009 - 1.00 I}} โย Preceding unsigned comment added by 110.22.20.252 (talk) 05:05, 25 November 2017 (UTC) 110.22.20.252 (talk) 03:30, 25 November 2017 (UTC)
- That's not really a question. But you seem a little confused on how to calculate square roots of complex numbers. You could try to take a look at Wikipedia's article on square roots and see if that clarifies your confusion. โDeacon Vorbisย (carbonย โขย videos) 03:37, 25 November 2017 (UTC)
- You seem to have basically discovered branches in multivalued functions.--108.52.27.203 (talk) 04:59, 25 November 2017 (UTC)
- Your question contains a heap of problems. For some reason you appear to be stepping around the twelve roots of unity (at 0ยฐ, 30ยฐ, 60ยฐ, ...), but when converting from polar form you then step around the twenty-four roots of unity. r cis ฮธ = r(cosฮธ + isinฮธ), not r(cosฮธ/2 + isinฮธ/2). And how did you wind up with +/- 179ยฐ? See Floating-point arithmetic#Accuracy problems and Rounding#Rounding to integer (round towards zero vs. round to nearest). If your numerical calculation package told you that 1 - (3 ยท 3-1) was nonzero (or that 3 ยท 3-1 truncated to zero), would you believe that you found a proof that multiplicative inverse does not work? If you have an actual question here, if would help if you let us know what you are doing your calculations on. -- ToE 18:09, 25 November 2017 (UTC)
- What are you talking about, I am not calculating the root of unity but sqrt(a_point_on_unit_circle). You can check my calculation yourself for 30 deg. Which is { deg , sqrt(cosฮธ + i sinฮธ) } and which calculates to { 30 deg , sqrt( cos 30 deg + i sin 30 deg ) } and calc to { 30 deg , sqrt( 0.866 + i 0.5 ) } and calc to {30 deg, 0.966 + 0.259 i }. I am trying to show that when you approach the point -1 + 0 i , the value of sqrt(-1 + 0 i) depends on which path you approach it from. 110.22.20.252 (talk) 06:28, 26 November 2017 (UTC)
Proof of (ab)mod m = (a ( b mod m)) mod m
The proof I have found in the Internet said:
Let , where - integer part; - fractional part, ;
multiply by :
;
;
.
QED.
But why did they decide that ??
Username160611000000 (talk) 12:43, 25 November 2017 (UTC)
- It might not be, but why is that a problem? It is perfectly legitimate to say 18 โก 11 (mod 7), for example, even though 11 > 7. All we need to be able to say a โก b (mod m) is for a โ b = km for integer k. Double sharp (talk) 13:34, 25 November 2017 (UTC)
- I don't understand. In Microsoft Calculator when I type (11 mod 7) I got single result 4. Username160611000000 (talk) 13:54, 25 November 2017 (UTC)
- There seems to be some confusion about the notation here. To me, a = b mod m is a relation between the three numbers a, b and m defined as true when m divides b-a. On the other hand the notation (b mod m) as used here seem to be the remainder of b when divided by m. This is sometimes denoted bย % m, which I prefer to avoid confusion with the other definition of 'mod'. The difference is illustrated by 10 = 4 mod 3 is true while 10 โ 4ย % 3 = 1.
- To answer the question, it seems like what they're claiming isn't true so the proof is incorrect. Specifically, it's false, in general, that a(bย % m) = abย % m. For example 2(2ย % 3) = 4 โ (2โ
2)ย % 3 = 1. --RDBury (talk) 13:46, 25 November 2017 (UTC)
- That's not what the OP is saying, I think. I think he means [a(bย % m)]ย % m = abย % m, which is indeed true in general. Double sharp (talk) 13:55, 25 November 2017 (UTC)
- Though come to think of it, the proof given seems to assume the mathematical definition of mod, which obviously leaves the OP unsatisfied because he wants assurance that the result of mod is a remainder and is therefore less than the modulus. @OP: in number theory, modulo is defined as an equivalence relation. It is not that "11 mod 7" is an operation that tells you to divide 11 by 7 and take the remainder, as you and Microsoft Calculator have it. Instead mod 7 is an equivalence relation that holds between any two integers which are a multiple of seven apart. So {...25, 18, 11, 4, โ3, โ10, โ17, ...} are all representatives of one equivalence class modulo 7, and it is just as legitimate to say 11 โก 4 (mod 7) as 11 โก 18 (mod 7), 11 โก โ3 (mod 7), or 11 โก 777777781 (mod 7). Your supposed gap in the proof comes from your expectation that the result of modulo must be the remainder, so that you think it has to be less than the modulus. But that's not the standard definition of modulus in mathematics. Double sharp (talk) 14:11, 25 November 2017 (UTC)
- That's not what the OP is saying, I think. I think he means [a(bย % m)]ย % m = abย % m, which is indeed true in general. Double sharp (talk) 13:55, 25 November 2017 (UTC)
I'm studing now RSA algorithm and found this relation here https://en.wikipedia.org/wiki/Modular_exponentiation#Memory-efficient_method . It seems true empirically, but I want to prove it.Username160611000000 (talk) 14:01, 25 November 2017 (UTC)
- Your trouble with it seems to stem solely from problems with the definition of mod. When you use the equivalence relation definition, these statements practically prove themselves: mod m acts as an equivalence relation, so if b and bย % m are congruent mod m (which they are by definition), then of course they act the same mod m under all operations. Double sharp (talk) 14:14, 25 November 2017 (UTC)
- I have heard about modulo as a relation. But for RSA algorithm mod means 'divide and take reminder' in all programming languages. Ok, how then should I prove this relation (where mod is defined as operation which gives a reminder)? Username160611000000 (talk) 14:24, 25 November 2017 (UTC)
- You can do it the same way, since any numbers belonging to the same equivalence class mod m have the same remainder when divided by m. So instead of saying a * (F_b) โก ab (mod m), you let a * (F_b)ย % m = r where r < m (take the remainder). Then a * (F_b) = mq + r. Then ab = ma * (I_b) + a * (F_b) = m * (a * I_b + q) + r, so abย % m = r, same as a * F_b. Then the result follows. Double sharp (talk) 14:59, 25 November 2017 (UTC)
- I have heard about modulo as a relation. But for RSA algorithm mod means 'divide and take reminder' in all programming languages. Ok, how then should I prove this relation (where mod is defined as operation which gives a reminder)? Username160611000000 (talk) 14:24, 25 November 2017 (UTC)
Are there any trigonometric identities for angles ย ? ืืืืื ืฉืืื ืืืืื (talk) 21:50, 25 November 2017 (UTC)
- Probably the closest you can come to this are multiple angle and fractional angle identities. See List of trigonometric identities#Multiple-angle formulae. --RDBury (talk) 06:28, 26 November 2017 (UTC)