AiSc 1

Pasted Nov 4, 2026, 3:45 PM1 file14 lines

Scan to open on your phone

Point a camera at the QR code - it opens this exact paste, no app needed.

https://codepastes.com/ai1
untitled
# Define fuzzy sets with elements and their membership degrees
A = {"x1": 0.2, "x2": 0.7, "x3": 0.4, "x4": 1.0}
B = {"x1": 0.5, "x2": 0.3, "x3": 0.9, "x4": 0.0}

# Perform Fuzzy Union (Max), Intersection (Min), and Complement (1 - x)
fuzzy_union = {k: max(A[k], B[k]) for k in A}
fuzzy_intersection = {k: min(A[k], B[k]) for k in A}
fuzzy_complement_A = {k: round(1.0 - A[k], 1) for k in A}

print("Fuzzy Set A:      ", A)
print("Fuzzy Set B:      ", B)
print("Union (A U B):    ", fuzzy_union)
print("Intersect (A n B):", fuzzy_intersection)
print("Complement (~A):  ", fuzzy_complement_A)

590 chars · codepastes.com