Questions tagged [commutativity]

In mathematics, a binary operation is commutative if changing the order of the operands does not change the result. It is a fundamental property of many binary operations, and many mathematical proofs depend on it. The name is needed because there are operations, such as division and subtraction, that do not have it (for example, "3 − 5 ≠ 5 − 3"); such operations are not commutative, and so are referred to as noncommutative operations. The idea that simple operations such as the multiplication and addition of numbers are commutative, was for many years implicitly assumed.

Source: https://en.wikipedia.org/wiki/Commutative_property

61 questions
0
votes
1 answer

Trying to implement commutativity in Prolog

I am trying to create a knowledge base. My problem has terminal/1 and connected/2 and I have defined the following rule: connected(X,Y) :- connected(Y,X). For reasons I now understand (I think), this went into an infinite recursion. Then, I tried…
karancan
  • 2,152
  • 4
  • 23
  • 35
1 2 3 4
5