0% found this document useful (0 votes)
2 views6 pages

Dmproj 1

The project report analyzes friend lists using set operations to identify common, unique, and exclusive friends among individuals in a social group. It applies set theory concepts such as union, intersection, and difference to derive insights into social relationships. The findings can be visualized and have potential applications in networking and community detection algorithms.

Uploaded by

sheshanth12344
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views6 pages

Dmproj 1

The project report analyzes friend lists using set operations to identify common, unique, and exclusive friends among individuals in a social group. It applies set theory concepts such as union, intersection, and difference to derive insights into social relationships. The findings can be visualized and have potential applications in networking and community detection algorithms.

Uploaded by

sheshanth12344
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Activity based

Project Report on
Discrete Mathematics
Submitted to Vishwakarma University, Pune
Under the Initiative of
Contemporary Curriculum, Pedagogy, and Practice
(C2P2)
By

Student Name- Sheshanth Shetty

SRN No: 31232481

Roll No: 72

Div: A

Second Year of Engineering Department of Computer


Engineering Faculty of Science and Technology
Academic Year 2024-2025
Analyzing Friend Lists Using Set Operations
To analyze the friend lists of individuals in a social group, we
can use set operations to determine common friends, unique
friends to each individual, and friends that are not shared with
anyone else.Let's define a set of friends for each individual:
 Alice: {Bob, Charlie, David}
 Bob: {Alice, Eve}
 Charlie: {Alice, David, Eve}
 David: {Alice, Charlie}
 Eve: {Bob, Charlie}
Common Friends
To find the common friends between any two individuals, we
can use the intersection operation on their friend sets.For

Alice ∩ Bob = {Bob} ∩ {Alice, Eve} = ∅The common friends


example, the common friends between Alice and Bob are:

between Alice and Charlie are:


Alice ∩ Charlie = {Bob, Charlie, David} ∩ {Alice, David, Eve} =
{Alice}
We can extend this to find common friends between all pairs of
individuals.
Unique Friends
find the unique friends of each individual, we can subtract the
union of all other friend sets from their own set.For example,

Alice - (Bob ∪ Charlie ∪ David ∪ Eve) = {Bob, Charlie, David} -


the unique friends of Alice are:

{Alice, Bob, Charlie, David, Eve} = ∅The unique friends of Bob

Bob - (Alice ∪ Charlie ∪ David ∪ Eve) = {Alice, Eve} - {Alice,


are:

Bob, Charlie, David, Eve} = ∅We can calculate the unique


friends for each To individual similarly.
Exclusive Friends
To find friends that are not shared with anyone else, we can
count the occurrences of each friend across all sets. Friends
that appear only once are exclusive.For example, the exclusive
friends are:
 David (appears in 2 sets: Alice and Charlie)
 Eve (appears in 2 sets: Bob and Charlie)
All other friends appear in more than one set, so they are not
exclusive.By applying these set operations, we can effectively
analyze the friend lists and gain insights into the social
relationships within the group.
Usage of Set Theory and Logic Concepts in the Project
This project focuses on analyzing the friend lists of individuals
in a social group using set theory and logic concepts. The
following points outline how these concepts are applied, along
with examples and explanations.
1. Basic Definitions
 Set: A collection of distinct objects, considered as an
object in its own right. For example, let FA={B,C,D
represent Alice's friends.
 Element: An individual item within a set. For
instance, BB is an element of FAFA.
2. Set Operations
 Union: The union of two sets combines all unique
elements from both sets.
 Example: FA∪FB={B,C,D}∪{A,E}={A,B,C,D,E}FA∪FB
={B,C,D}∪{A,E}={A,B,C,D,E}.
 Intersection: The intersection of two sets finds common
elements.
 Example: FA∩FB={B,C,D}∩{A,E}=∅FA∩FB
={B,C,D}∩{A,E}=∅.
 Difference: The difference between two sets shows
elements in one set that are not in the other.
 Example: FA−FB={B,C,D}−{A,E}={B,C,D}FA−FB
={B,C,D}−{A,E}={B,C,D}.
3. Relations
 A relation is a connection between elements of one set to
elements of another.
 In our project, we define a relation based on friendships:
 If AA is friends with BB, we denote this
as (A,B)∈R(A,B)∈R.
4. Functions
 A function maps each element from one set to exactly one
element in another set.
 In our context:
 Define a
function f:S×S→Sf:S×S→S where f(A,B)=A and B are
friendsf(A,B)=A and B are friends.
5. Closure Property
 A set is closed under an operation if performing that
operation on members of the set always produces a
member of the same set.
 For example:
 If FAFA and FBFB are friend sets, then their
union FA∪FBFA∪FB is still a valid friend list.
6. Identity Element
 An identity element for a set under a binary operation is
an element that does not change other elements when
used in the operation.
 In friendship analysis:
 The identity could be represented by an empty friend
list; adding it to any friend's list does not change the
original list.
7. Associativity
 Associativity refers to how operations can be grouped
without affecting the outcome.
 For example:
 If we have three individuals A,B,CA,B,C, then the
order of finding common friends does not matter:
(FA∩FB)∩FC=FA∩(FB∩FC)(FA∩FB)∩FC=FA∩(FB∩FC).
8. Application of Set Operations in Friend Analysis
 To find common friends among all individuals:
1. Compute pairwise intersections of friend sets.
2. Store results for later analysis.
9. Determining Unique Friends
 To find unique friends for each individual:
1. Use the difference operation to subtract other
individuals' friend lists from each individual's list.
2. This helps identify friends that are exclusive to each
individual.
10. Identifying Exclusive Friends
 To find friends that no one else shares:
1. Count occurrences of each friend across all lists.
2. Friends appearing only once across all lists are
classified as exclusive.
11. Logical Framework
 Each operation can be viewed through logical
propositions:
 Let P(x)P(x) be "x is a friend of A". Then using logical
conjunctions and disjunctions can help formulate
relationships.
12. Algorithm Design Using Set Theory
 The analysis can be structured algorithmically:
1. Input: Friend lists as sets.
2. Output: Common friends, unique friends for each
individual, and exclusive friends.
13. Visualization of Relationships
 Sets can be visualized using Venn diagrams to represent
intersections and unions graphically.
14. Complexity Analysis
 Using set operations allows for efficient algorithms to
analyze friendships without redundant checks.
15. Real-World Applications
 This analysis can extend beyond social groups to
applications in networking sites or community detection
algorithms.

You might also like