![]() |
![]() |
#1 |
2·32·449 Posts |
![]()
Sorry if posting for a complete code is wrong.
but this is my last option. i need to submit code and present a ppt on quadratic sieve method in c++ in 2 days. anyone who did it before post it,i would be very thankful to them. i found some codes on internet but they are very big.i need a simple implementation. Thanks in advace |
![]() |
![]() |
#2 |
Tribal Bullet
Oct 2004
DFA16 Posts |
![]()
Many people here have written QS code, but if the code must be simple in order to look like you wrote it, then I don't think we can help you. Further, if you're starting from scratch now, then 2 days isn't nearly enough to figure out the details of the low-level libraries for handling large integers and number-theoretic functions that you will need to get a working implementation. The smallest C code I've seen for QS was about 1500 lines of C, and that doesn't include the code for the large integer arithmetic.
Doing everything from the beginning, it took me about 3-4 months to get something working. |
![]() |
![]() |
![]() |
#3 |
Dec 2010
Monticello
5×359 Posts |
![]()
If you've got to go for speed of implementation (as opposed to speed of running), perl is the best language, as all the data structures (lists, hashes, functions returning multiple values, etc) are built in.
In your shoes: I'd present the basic algorithm, and write a main(). Assume lots of functionality. Jasonp's 1500 lines will take at least 3-4 days to write, assuming you are a top-level coder. And plan further ahead in the future! There's no way you have time to learn perl. Stop writing code in 24 hours, and write power-pointless, since that is what your audience will see. |
![]() |
![]() |
![]() |
#4 | ||
"Forget I exist"
Jul 2009
Dartmouth NS
5·13·131 Posts |
![]() Quote:
Quote:
Last fiddled with by science_man_88 on 2011-10-30 at 01:58 |
||
![]() |
![]() |
![]() |
#5 | |
"Bob Silverman"
Nov 2003
North of Boston
2×3×31×41 Posts |
![]() Quote:
One also needs a good understanding of the algorithm itself; in detail, as well as knowing enough number theory; one can't code the algorithm without knowing e.g. what a quadratic residue is, and how/why the Jacobi symbol works. |
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Base method of montgomery polyselect implementation | csg | Homework Help | 2 | 2017-12-13 07:04 |
Special-q method for Quadratic Sieve | mickfrancis | Factoring | 3 | 2016-05-03 08:50 |
Possible improvement of quadratic sieve | Random Poster | Factoring | 4 | 2010-02-12 03:09 |
Factoring in the Quadratic Sieve | ThiloHarich | Factoring | 47 | 2007-01-08 14:12 |
Quadratic Sieve in wikipedia.de | ThiloHarich | Factoring | 5 | 2006-07-14 09:51 |