Questions tagged [equivalence]

Equivalence is a relationship in which two or more identifiers are abstractions for the same data structure.

References

168 questions
1
vote
1 answer

Logical Equivalence - OR gates and implication

I'm currently answering a logical equivalence question and would like confirmation of the rule I used at one point as it is not in the list of laws, presumably because it's "something you should just know". Part of my working is (NOT(p) OR NOT(q))…
1
vote
2 answers

strings seemingly not equivalent using substring()

Possible Duplicate: Java String.equals versus == i am new to java so don't expect things to be easy but this has me totally shell shocked. why on earth doesn't the if statement evaluate properly: import javax.swing.JFrame; import…
Gimli
  • 29
  • 4
1
vote
2 answers

Equivalence between ifs and forms of case statements in Ruby

Using the ruby_parser and Ruby2Ruby gems, I'm writing code that keeps track of what conditions have been evaluated and what their results and parameters were. In order to keep this as simple as possible, I sometimes rewrite the AST a bit. Of course,…
Confusion
  • 16,256
  • 8
  • 46
  • 71
0
votes
0 answers

Bounds in wilcoxon equivalence test

I conducted an equivalence test for variables that are not normally distributed, by the wilcox_TOST function (from TOSTER package in R) for paired samples. here is my code: wilcox_TOST(x, y, hypothesis = "EQU", paired = TRUE, eqb=0.3, ses = "rb",…
Noa Vardi
  • 13
  • 6
0
votes
0 answers

Beta equivalence - lambda terms

I calculated beta reduction of the lambda-terms below, i want to know if the results i have are correct. NB: l denotes lambda a- ( (lxy.( x( x (x y) ) )) (lx.z) ) b- ( (lf.(lx.f (x x) )) (lx.f (x x)) g ) result : a- ly.(z (z (z y))) b- (f…
0
votes
0 answers

What is the algorithm for checking logical equivalence of specifications?

Consider I have an audience target group defined as: age >= 13 && gender == Gender.Female or as gender == Gender.Female && age >= 13 These are equivalent specifications, which differ slightly in definition. However, specifications can be…
Pavel Voronin
  • 13,503
  • 7
  • 71
  • 137
0
votes
0 answers

making a set/map comparator with find by equivalence

What are the requirements to ensure that type equivalence can be used in the find function of a sorted container? Specifically how does mixed type comparison work. Setup Say I've got a struct, comparator, and set struct Wrapper{int…
Sir Demios
  • 83
  • 11
0
votes
1 answer

Material Conditional and Equivalence in Programming

I have just started reading into propositional calculus/logic, and have realised that a lot of the foundational concepts in this area are similar to those encountered in programming. That is, propositions/sentences in logic (due to the fact that…
0
votes
0 answers

Dict equivalency in python

I'd like to find out how dictionary equivalence is checked in python, depending on whether the same dictionary instance is used, or a different instance with the same values. I've found some stackoverflow posts hinting at the answer, but none…
NewJob
  • 59
  • 3
0
votes
1 answer

Tree method on propositional logic

Why we cannot construct a tree to test logical equivalence for 2 formulas the same way we do with validity? Because if both formulas have the same logical truth negating one of them will close the tree right?
user870251
  • 31
  • 1
0
votes
1 answer

ksoap2 equivalent to didStart/didEndElement?

my question for today is that i'm curious about if there is a close relative and/or equivalence in java using the ksoap2-library to parse element-by-elements. In objective-c for example: public void didEndElement(args....){ if occurring…
Jens Bergvall
  • 1,617
  • 2
  • 24
  • 54
0
votes
1 answer

Why can't using "await" for each mapped element in an array of promises be used instead of "promise.all"?

I have an array of fetch API calls that have been resolved as shown below: let results = await Promise.all(promises); I'm trying to get the result of each resolved fetch API call in the array. I tried console logging the results expecting the…
0
votes
0 answers

Lsode package installation in octave

I have octave version 6.3. I don't have lsode package in-built. From which repository, i can install it in octave? My second question: Sometimes to help describe one expression, another expression is shown that produces identical results. The exact…
0
votes
0 answers

If ~ is an equivalence relation on A. Show :

If ~ is an equivalence relation on A. Show : the unempty subset C of set A is in the equivalance class ~ , iff y & z are in C then y~z. This is a question I've faced in my homeworks and couldn't find an appropriate proof. I'd be grateful if someone…
user16306298
0
votes
1 answer

How do I solve this equation with logical equivalence laws?

The problem is : Show that ¬ p → (q → r) and q → (p v r) are logically equivalent. I'm having trouble proving this with the use of Logical Identities. Any help is much appreciated.
WiloWisk
  • 137
  • 3
  • 10