Download presentation
Presentation is loading. Please wait.
Published byAshlynn Stokes Modified over 6 years ago
1
Propositional Equivalences Rosen 5th and 6th Editions section 1.2
2
I assume you know what follows
6
Okay? If not then please read appropriate section from Rosen
9
// // are functions f and g logically equivalent? public class Obfuscate { public static boolean f(int x,int y){ boolean z; if (!(x>5 || (x<=5 && y<3))) z = true; else z = false; return z; } public static boolean g(int x,int y){return x<=5 && y>=3;} public static void main(String[] args) { int n = Integer.parseInt(args[0]); int m = Integer.parseInt(args[1]); System.out.println(f(n,m) + " " + g(n,m));
10
What’s the difference between
& and && | and ||
13
Can you think of a reason why we might use
| in place of || & in place of &&
14
Propositional Equivalences
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.