Click here to Skip to main content
15,900,108 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: Good way to detect a useful portion of equivalent expressions Pin
David198718-Mar-11 4:13
David198718-Mar-11 4:13 
GeneralRe: Good way to detect a useful portion of equivalent expressions Pin
_Erik_18-Mar-11 4:40
_Erik_18-Mar-11 4:40 
GeneralRe: Good way to detect a useful portion of equivalent expressions Pin
David198718-Mar-11 4:52
David198718-Mar-11 4:52 
GeneralRe: Good way to detect a useful portion of equivalent expressions Pin
_Erik_18-Mar-11 5:18
_Erik_18-Mar-11 5:18 
AnswerRe: Good way to detect a useful portion of equivalent expressions Pin
Luc Pattyn18-Mar-11 5:48
sitebuilderLuc Pattyn18-Mar-11 5:48 
GeneralRe: Good way to detect a useful portion of equivalent expressions Pin
_Erik_18-Mar-11 6:21
_Erik_18-Mar-11 6:21 
AnswerRe: Good way to detect a useful portion of equivalent expressions Pin
Luc Pattyn18-Mar-11 7:09
sitebuilderLuc Pattyn18-Mar-11 7:09 
GeneralRe: Good way to detect a useful portion of equivalent expressions Pin
_Erik_21-Mar-11 2:55
_Erik_21-Mar-11 2:55 
Luc Pattyn wrote:
that depends a lot on the kind of expressions, operators, functions, ... you
envision.

Sure, I was giving an idea that might be worth under some previous conditions, and maybe some expressioins, operators, functions... would be hard to compare this way. However...

Luc Pattyn wrote:
you will have a hard time to compare (i==48329134)?1:0 and
(i==48329135)?1:0 in a heuristic way.

Not that hard in this case, since these expressions can be defined as:

f1(n) = 1 if n==48329134; 0 in any other case
f2(n) = 1 if n==48329135; 0 in any other case

We have two base cases here for each one of the expressions: n=0 and n=48329134 in the first case; n=0 and n=48329135 on the second one, so the method I have described before would work perfectly and really quick finding the two expressions are not equivalent becouse one of the base cases do not match.
GeneralRe: Good way to detect a useful portion of equivalent expressions Pin
molesworth18-Mar-11 4:40
molesworth18-Mar-11 4:40 
GeneralRe: Good way to detect a useful portion of equivalent expressions [modified] Pin
_Erik_18-Mar-11 4:44
_Erik_18-Mar-11 4:44 
GeneralRe: Good way to detect a useful portion of equivalent expressions Pin
David198718-Mar-11 4:54
David198718-Mar-11 4:54 
GeneralRe: Good way to detect a useful portion of equivalent expressions Pin
_Erik_18-Mar-11 5:24
_Erik_18-Mar-11 5:24 
GeneralRe: Good way to detect a useful portion of equivalent expressions Pin
Matty221-Apr-11 1:51
Matty221-Apr-11 1:51 
GeneralRe: Good way to detect a useful portion of equivalent expressions Pin
David19871-Apr-11 3:35
David19871-Apr-11 3:35 
GeneralRe: Good way to detect a useful portion of equivalent expressions Pin
mbyamukama3-Apr-11 2:08
mbyamukama3-Apr-11 2:08 
GeneralRe: Good way to detect a useful portion of equivalent expressions [modified] Pin
David19873-Apr-11 2:35
David19873-Apr-11 2:35 
AnswerRe: Good way to detect a useful portion of equivalent expressions Pin
Alex Shtof9-Apr-11 10:47
Alex Shtof9-Apr-11 10:47 
GeneralRe: Good way to detect a useful portion of equivalent expressions Pin
David19879-Apr-11 21:14
David19879-Apr-11 21:14 
GeneralRe: Good way to detect a useful portion of equivalent expressions Pin
Alex Shtof11-Apr-11 9:06
Alex Shtof11-Apr-11 9:06 
GeneralRe: Good way to detect a useful portion of equivalent expressions Pin
David198711-Apr-11 9:14
David198711-Apr-11 9:14 
AnswerRe: Good way to detect a useful portion of equivalent expressions Pin
dasblinkenlight11-Apr-11 9:21
dasblinkenlight11-Apr-11 9:21 
GeneralRe: Good way to detect a useful portion of equivalent expressions Pin
David198711-Apr-11 18:50
David198711-Apr-11 18:50 
GeneralRe: Good way to detect a useful portion of equivalent expressions Pin
dasblinkenlight12-Apr-11 8:15
dasblinkenlight12-Apr-11 8:15 
Questionjava or C# , which better? Pin
Anwar Isaed9-Mar-11 23:12
Anwar Isaed9-Mar-11 23:12 
AnswerRe: java or C# , which better? Pin
Pravin Patil, Mumbai9-Mar-11 23:26
Pravin Patil, Mumbai9-Mar-11 23:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.