LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 11-17-2003, 08:08 PM   #1
LinuxTiro
Member
 
Registered: Aug 2003
Posts: 59

Rep: Reputation: 15
Algo for Relatively prime No.


can neone suggest me an algo for finding a relatively prime number from two given
8digited prme numbers.
let p and q be two 8 digited prime numbers.

n=pxq
s=relatively prime to n
 
Old 11-17-2003, 08:12 PM   #2
teval
Member
 
Registered: Jul 2003
Location: Toronto, Canada
Distribution: Gentoo
Posts: 720

Rep: Reputation: 30
Sounds like a hw problem
Personally.. I just want to say I'm opposed to answering this type of thing
 
Old 11-17-2003, 08:23 PM   #3
LogicG8
Member
 
Registered: Jun 2003
Location: Long Island, NY
Distribution: Gentoo Unstable (what a misnomer)
Posts: 380

Rep: Reputation: 30
That's actually pretty trivial...

Get a list of 3 different primes. Look for a prime that isn't
p or q. Since you have different 3 numbers you will always
be able to find one. Print it out.
 
Old 11-17-2003, 08:55 PM   #4
LinuxTiro
Member
 
Registered: Aug 2003
Posts: 59

Original Poster
Rep: Reputation: 15
Thanx.
this was not a homework problem,but part of a bigger program.
 
Old 11-17-2003, 09:00 PM   #5
LogicG8
Member
 
Registered: Jun 2003
Location: Long Island, NY
Distribution: Gentoo Unstable (what a misnomer)
Posts: 380

Rep: Reputation: 30
Mind if I ask what the larger programs purpose is?
 
Old 11-17-2003, 09:02 PM   #6
LinuxTiro
Member
 
Registered: Aug 2003
Posts: 59

Original Poster
Rep: Reputation: 15
I have to write a code for Blum Blum shub Generator
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
RSA prime numbers? tarballedtux Linux - Security 19 06-28-2008 06:12 PM
editing the linux cpu scheduling algo cathiejcm Linux - Software 1 11-11-2005 07:25 AM
C Prime Generator Chrax Programming 9 12-23-2004 01:02 AM
GCD Algo. Help dontcare Programming 2 10-16-2004 09:50 PM
mersenne prime number zetsui Linux - Software 3 08-23-2003 01:23 PM


All times are GMT -5. The time now is 08:37 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration