AiSc 9

Pasted Nov 4, 2026, 3:49 PM1 file19 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/ai9
untitled
# Bounded sum: min(1, A + B)
# Bounded difference: max(0, A + B - 1)

A = {"x1": 0.6, "x2": 0.4, "x3": 0.9}
B = {"x1": 0.5, "x2": 0.2, "x3": 0.3}

bounded_sum = {
    k: min(1.0, A[k] + B[k]) for k in A
}

bounded_diff = {
    k: max(0.0, round(A[k] + B[k] - 1.0, 1))
    for k in A
}

print("Fuzzy Set A:        ", A)
print("Fuzzy Set B:        ", B)
print("Bounded Sum:        ", bounded_sum)
print("Bounded Difference: ", bounded_diff)

438 chars · codepastes.com