Proving string relation is a partial order ?

Click For Summary
SUMMARY

The substring relation on any set of strings is a partial order, characterized by three properties: reflexivity, antisymmetry, and transitivity. Reflexivity holds because any string u can be expressed as u = xuy, where both x and y can be empty strings. Antisymmetry is established by demonstrating that if u is a substring of v and v is a substring of u, then u must equal v. Transitivity is proven by showing that if u is a substring of v and v is a substring of w, then u is also a substring of w. These properties collectively confirm that the substring relation satisfies the conditions of a partial order.

PREREQUISITES
  • Understanding of string theory and substring definitions
  • Knowledge of mathematical relations and their properties
  • Familiarity with formal proof techniques in mathematics
  • Basic concepts of order theory in mathematics
NEXT STEPS
  • Study formal proofs of reflexivity, antisymmetry, and transitivity in mathematical relations
  • Explore examples of partial orders in set theory
  • Learn about the implications of substring relations in computer science, particularly in algorithms
  • Investigate other types of order relations, such as total orders and well-orders
USEFUL FOR

Students of mathematics, computer science enthusiasts, and anyone interested in formal logic and proof techniques related to string theory and order relations.

tangibleLime
Messages
71
Reaction score
0

Homework Statement


A string u is defined to be a substring of v if v=xuy for some strings x and y. Prove that the substring relation on any set of strings is a partial order.

Homework Equations


Relation R is reflexive if it always holds for an element and itself.
Relation R is antisymmetric if you can switch the variables in a true instance (and the variables aren't equal) you get a false instance.
Relation R is transitive if you can chain two true instances involving the same variable y to get a true instance. e.g. (x,y)^(y,z) -> (x,z)
And a partial order is when it has all three of these properties.

The Attempt at a Solution


Okay... so I know that to be a partial order the relation needs to be reflexive, antisymmetric and transitive.

Reflexive:
I can't figure out how to prove it's reflexive... because doesn't that mean it would be v=xuy <--> v=xux? But what if x and y are different strings?

Anti-symmetric:
I can prove this (but maybe my proof is wrong) by saying that I can switch x and y which will change the string if they are different. If x="hello", u="there", y="world", v=xuy=hellothereworld, but v=yux=worldtherehello, which are not equal and therefore false.

Transitive:
I'm really just at a loss as to how to prove this... I don't even know where to start.

Any help would be extremely appreciated, but I don't want the answers. Just a push in the right direction.
 
Physics news on Phys.org
tangibleLime said:

Homework Statement


A string u is defined to be a substring of v if v=xuy for some strings x and y. Prove that the substring relation on any set of strings is a partial order.


Homework Equations


Relation R is reflexive if it always holds for an element and itself.
Relation R is antisymmetric if you can switch the variables in a true instance (and the variables aren't equal) you get a false instance.
Relation R is transitive if you can chain two true instances involving the same variable y to get a true instance. e.g. (x,y)^(y,z) -> (x,z)
And a partial order is when it has all three of these properties.

The Attempt at a Solution


Okay... so I know that to be a partial order the relation needs to be reflexive, antisymmetric and transitive.

Reflexive:
I can't figure out how to prove it's reflexive... because doesn't that mean it would be v=xuy <--> v=xux? But what if x and y are different strings?
No, if u is a substring of u, then u = xuy for some strings x and y. I'm assuming that "some string" includes the possibility of an empty string, a string with no characters in it.
tangibleLime said:
Anti-symmetric:
I can prove this (but maybe my proof is wrong) by saying that I can switch x and y which will change the string if they are different. If x="hello", u="there", y="world", v=xuy=hellothereworld, but v=yux=worldtherehello, which are not equal and therefore false.
That's not right. It's not that you can switch x and y, but that you can switch u and v. You have u as a substring of v, which is "hellothereworld". Is v also a substring of u ("there")? If so, it would have to be the case that u = xvy. Is "there" the same string as "hellohellothereworldworld"?
tangibleLime said:
Transitive:
I'm really just at a loss as to how to prove this... I don't even know where to start.
If u is a substring of v, and v is a substring of w, will it also be true that u is a substring of w?

Think about it in terms of examples, like you were doing before.
tangibleLime said:
Any help would be extremely appreciated, but I don't want the answers. Just a push in the right direction.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 24 ·
Replies
24
Views
3K
  • · Replies 5 ·
Replies
5
Views
13K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
4
Views
2K
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 17 ·
Replies
17
Views
11K
  • · Replies 4 ·
Replies
4
Views
2K