mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Math

Reply
 
Thread Tools
Old 2017-12-12, 15:12   #12
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

2·33·109 Posts
Default

Could you store and sort the logarithm of the large numbers?
henryzz is offline   Reply With Quote
Old 2017-12-12, 15:31   #13
xilman
Bamboozled!
 
xilman's Avatar
 
"π’‰Ίπ’ŒŒπ’‡·π’†·π’€­"
May 2003
Down not across

2A1C16 Posts
Default

Quote:
Originally Posted by alpertron View Post
Is there any way to generate the 8 values of x (mod 7*13*37) sorted without having to generate all values of x using CRT and then sorting them?
Knuth, 4.3.2, especially Theorem S.

TL;DR: no.
xilman is offline   Reply With Quote
Old 2017-12-13, 04:24   #14
LaurV
Romulan Interpreter
 
LaurV's Avatar
 
Jun 2011
Thailand

32×29×37 Posts
Default

Quote:
Originally Posted by alpertron View Post
... because this is an application that runs inside a Web browser and the memory is limited. The problem is not the sorting time (calculating the modular values of x is more expensive), but the amount of memory.
[offtopic]
That is funny to hear, considering that my browser successfully grabs all the memory it can, letting my computer dressed like Adam and Eve, and running extremely slow, no mater what web pages I open, as soon as there are enough of them opened ....
(this is just a joke, the things are not so bad, really)
[/offtopic]

Last fiddled with by LaurV on 2017-12-13 at 04:27 Reason: Ramanization
LaurV is offline   Reply With Quote
Old 2017-12-13, 12:28   #15
alpertron
 
alpertron's Avatar
 
Aug 2002
Buenos Aires, Argentina

55616 Posts
Default

Quote:
Originally Posted by LaurV View Post
[offtopic]
That is funny to hear, considering that my browser successfully grabs all the memory it can, letting my computer dressed like Adam and Eve, and running extremely slow, no mater what web pages I open, as soon as there are enough of them opened ....
(this is just a joke, the things are not so bad, really)
[/offtopic]
The problem is that we cannot use a lot of memory for an application residing in a particular tab. Furthermore, I want my applications to run on smartphones, which do not have a lot of memory when compared to desktops.
alpertron is offline   Reply With Quote
Old 2017-12-13, 13:39   #16
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

26·131 Posts
Default

Quote:
Originally Posted by alpertron View Post
The problem is that we cannot use a lot of memory for an application residing in a particular tab. Furthermore, I want my applications to run on smartphones, which do not have a lot of memory when compared to desktops.
the real hard part, is finding any hard and fast rules to sort by. you can calculate things using addition and mod like this:

13\bmod7\equiv6
so we have the chain 3,9 mod 7 when we add mod 7 for the 13 case, and 9\equiv 2 \bmod 7 resulting in 13+3=16 mod the product of 7 and 13 which can be reduced to a addition loop. but that without being able to sort other things this doesn't help much ( though the thought to sort by different subsets of the conditions has popped into mind, I'm not sure it helps).
science_man_88 is offline   Reply With Quote
Old 2017-12-13, 15:04   #17
xilman
Bamboozled!
 
xilman's Avatar
 
"π’‰Ίπ’ŒŒπ’‡·π’†·π’€­"
May 2003
Down not across

22·5·72·11 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
the real hard part, is finding any hard and fast rules to sort by. you can calculate things using addition and mod like this:

13\bmod7\equiv6
so we have the chain 3,9 mod 7 when we add mod 7 for the 13 case, and 9\equiv 2 \bmod 7 resulting in 13+3=16 mod the product of 7 and 13 which can be reduced to a addition loop. but that without being able to sort other things this doesn't help much ( though the thought to sort by different subsets of the conditions has popped into mind, I'm not sure it helps).
Did you read the Knuth, the whole Knuth and nothing but the Knuth I suggested before posting the above?

I'm trying very hard not to go into a -like meltdown at this point
xilman is offline   Reply With Quote
Old 2017-12-13, 21:49   #18
science_man_88
 
science_man_88's Avatar
 
"Forget I exist"
Jul 2009
Dumbassville

100000110000002 Posts
Default

Quote:
Originally Posted by xilman View Post
Did you read the Knuth, the whole Knuth and nothing but the Knuth I suggested before posting the above?

I'm trying very hard not to go into a -like meltdown at this point
so ban me for a week, I can't even find the result you talk about using google.
science_man_88 is offline   Reply With Quote
Old 2017-12-13, 22:04   #19
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

2×33×109 Posts
Default

Quote:
Originally Posted by science_man_88 View Post
so ban me for a week, I can't even find the result you talk about using google.
https://github.com/djtrack16/thyme/b...g.Volume.2.pdf
henryzz is offline   Reply With Quote
Old 2017-12-13, 22:24   #20
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

976710 Posts
Default

Quote:
Originally Posted by xilman View Post
Did you read the Knuth, the whole Knuth and nothing but the Knuth I suggested before posting the above?
I still have Knuth's Metafont book in my library.

Damn that guy is funny!!!

Edit: I love how awkward he is. https://www.youtube.com/watch?v=zwp4kxhUgZU

Last fiddled with by chalsall on 2017-12-13 at 23:01
chalsall is offline   Reply With Quote
Old 2017-12-13, 23:14   #21
alpertron
 
alpertron's Avatar
 
Aug 2002
Buenos Aires, Argentina

25268 Posts
Default

Quote:
Originally Posted by xilman View Post
Knuth, 4.3.2, especially Theorem S.

TL;DR: no.
I have read that threorem S but it is not applicable to this problem, because that theorem works when the values are represented as (a1 mod m1, a2 mod m2, a3 mod m3, etc).

In my case I can represent the values as a + b * b1 + c * c1 + d * d1 + ... (mod m), where b1, c1, d1, etc. can equal zero or one so only a few CRTs are required in my case to determine a, b, c, d, etc.
alpertron is offline   Reply With Quote
Old 2017-12-13, 23:24   #22
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

9,767 Posts
Default

Quote:
Originally Posted by alpertron View Post
In my case I can represent the values as a + b * b1 + c * c1 + d * d1 + ... (mod m), where b1, c1, d1, etc. can equal zero or one so only a few CRTs are required in my case to determine a, b, c, d, etc.
So that suggests an optimization is possible.

Any success with that yet?
chalsall is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Complexity of Chinese Remainder Theorem carpetpool Miscellaneous Math 4 2017-02-09 19:26
Basic Number Theory 6: functions and the Chinese Remainder Theorem Nick Number Theory Discussion Group 4 2016-10-31 22:26
Chinese Remainder Problem ShiningArcanine Math 2 2007-11-17 10:01
Implementing Chinese Remainder Theorem in C ShiningArcanine Software 3 2007-11-17 05:55
Card Sorting Probability Mini-Geek Math 13 2007-01-13 15:31

All times are UTC. The time now is 16:16.


Mon Aug 2 16:16:27 UTC 2021 up 10 days, 10:45, 0 users, load averages: 2.23, 2.36, 2.29

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.