What is the formula for creating a set of paired elements?

In summary, you are trying to express a given requirement in a software system. You are used to UML and UseCase specification, but you thought you would attempt to learn Zed Specification (which is based off logic, set theory., etc... so those topics too!). Given two sets of data, in Zed notation you are having difficulty trying to write down the formula for specifying a set containing a list of paired values. In set notation, you are having difficulty trying to write down the formula for specifying a set containing a list of paired values. However, in set notation you are able to write down the formula for specifying a set containing a list of paired values if each paired value is a single member of that set. For
  • #1
necro_ignis
4
0
Hi all,

I'm trying to express a given requirement in a software system. I'm used to UML and UseCase specification, but I thought I would attempt to learn Zed Specification (which is based off logic, set theory., etc... so those topics too!)

Given two sets of data
e.g. in Zed notation

[X] ::= a|b|c|d
[Y]::= 1|2|3|4

or in Set Theory

X = {a,b,c,d}
Y = {1,2,3,4}

In set notation I am having difficulty trying to write down the formula for specifying a set containing a list of pairs made from X and Y. Note: Not a Cartesian Product.
So I'm looking for a Set definition for something like this:

MysterySet = {(a,1),(b,2),(c,3),(d,4)}
or a further example,
Material = {(chair,wood),(table,metal),(cup,clay)}

This is basically an analogy for a key-value pair.

Thanks very much.
 
Physics news on Phys.org
  • #2
I can't decipher just what it is you are trying to do...
 
  • #3
Hurkyl said:
I can't decipher just what it is you are trying to do...

Hi :smile:

I'm just trying to write a set definition for a set containing a list of paired values. Where each paired value is a single member of that set.

For example the set of all married couples Married = {(bob,jane),(fred,susan),(mike,sarah)} will have been built from the two sets: female={jane,susan,sarah} and male={bob,fred,mike}

So in a set definition how do I say something like:

each element in the set "Married" is a paired value from an enumerated one-to-one mapping between an element in the set male to the set female.

Hope that help! :biggrin: I could do this is a second programmatically but I have become extremely interested in modeling using set theory and logic, although it's something I've only just strated learning.

Thanks
 
  • #4
After having done further research, it looks like a set of key-valued pairs might be (might be, being this is what I have thought up myself) represented as the set of all bijections as denoted X[tex]\leftrightarrow[/tex]Y.

So would I be right in saying (this is so sketchy and grasping at straws)
If I have a dom X = {1,2,3} and ran Y = {a,b,c} then a set S = {f:X[tex]\leftrightarrow[/tex]Y} would infact look like S={(a,1),(b,2),(c,3)}

P.S. Still getting used to the Latex function on this forum :rolleyes:

Thanks
 

1. What is a set of paired elements?

A set of paired elements, also known as a pair set, is a collection or group of objects that are organized in pairs or two by two. Each pair consists of two distinct elements that are related in some way.

2. Why are paired elements important in scientific research?

Paired elements are important in scientific research because they allow scientists to compare and analyze two related objects or variables. This can help to identify patterns, relationships, and differences between the paired elements, which can provide valuable insights and contribute to scientific knowledge.

3. How are paired elements used in experiments?

Paired elements are commonly used in experiments as control and experimental groups. This means that one group is exposed to a specific variable, while the other group is not, allowing for a comparison between the two. Paired elements can also be used to measure the effects of a treatment or intervention.

4. Can paired elements be used in non-scientific contexts?

Yes, paired elements can be used in non-scientific contexts as well. For example, in statistical analysis, paired elements can be used to compare data points from two different time periods or groups. In business, paired elements can be used to compare the performance of two similar products or strategies.

5. What are some examples of paired elements in nature?

Examples of paired elements in nature include the wings of a bird, the eyes of a spider, and the legs of a horse. In each of these cases, the paired elements work together to serve a specific purpose, such as flying, hunting, or running. Other examples include the complementary base pairs in DNA, the male and female reproductive organs in plants, and the positive and negative charges in atoms.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
5
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
3
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Set Theory, Logic, Probability, Statistics
Replies
14
Views
3K
  • Set Theory, Logic, Probability, Statistics
2
Replies
62
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
27
Views
3K
  • Set Theory, Logic, Probability, Statistics
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
511
Replies
2
Views
308
  • Set Theory, Logic, Probability, Statistics
Replies
1
Views
1K
Back
Top