# a: Addition of two LR fuzzy numbers In Calculator.LR.FNs: Calculator for LR Fuzzy Numbers

## Description

This function calculates the addition (summation) of two LR fuzzy numbers M=(m, α, β)_{LR} and N=(n, δ, γ)_{LR} on the basis of Zadeh extension principle by the following formula:

M \oplus N = (m+n, α+δ, β+γ)_{LR}

## Usage

 `1` ```a(M, N) ```

## Arguments

 `M` The first LR (or RL or L) fuzzy number `N` The second LR (or RL or L) fuzzy number

## Value

A LR (or RL or L) fuzzy number

Abbas Parchami

## References

Dubois, D., Prade, H., Fuzzy Sets and Systems: Theory and Applications. Academic Press (1980).

Dubois, D., Prade, H., Operations on fuzzy numbers. International Journal of Systems Science 9 (1978), 613-626.

Dubois, D., Prade, H., Fuzzy numbers: An overview. In In: Analysis of Fuzzy Information. Mathematical Logic, Vol. I. CRC Press (1987), 3-39.

Dubois, D., Prade, H., The mean value of a fuzzy number. Fuzzy Sets and Systems 24 (1987), 279-300.

Kaufmann, A., Gupta, M.M., Introduction to Fuzzy Arithmetic. van Nostrand Reinhold Company, New York (1985).

Taheri, S.M, Mashinchi, M., Introduction to Fuzzy Probability and Statistics. Shahid Bahonar University of Kerman Publications, In Persian (2009).

Viertl, R., Statistical Methods for Fuzzy Data. John Wiley & Sons, Chichester (2011).

Zadeh, L.A., The concept of a linguistic variable and its application to approximate reasoning-I. Information Sciences 8 (1975), 199-249.

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58``` ```# Example 1: Left.fun = function(x) { (1/(1+x^2))*(x>=0)} Right.fun = function(x) { (1/(1+(2*abs(x))))*(x>=0)} M = LR(1, 0.6, 0.2) N = LR(3, 0.5, 1) a(N, M) # commutative property for addition on LR fuzzy numbers (Jabejaei) P = RL(5, 0.1, 0.3) a(N, P) a(P, P) # associative property for addition on LR fuzzy numbers (Sherekat-paziri) a(N, a(M, M)) a(a(N, M), M) # Example 2: A = LR(2, 1, 3) B = LR(3, 1.2, 1.8) LRFN.plot( A, xlim=c(-3,12), ylim=c(0,1.25), lwd=2, lty=2, col=2) LRFN.plot( B, lwd=2, lty=1, col=5, add=TRUE) LRFN.plot( a(A, B), lwd=2, col=1, add=TRUE) legend( "topright", c("A = LR(2, 1, 3)", "B = LR(3, 1.2, 1.8)", "A + B = LR(5, 2.2, 4.8)") , col = c(2, 5, 1), text.col = 1, lwd = c(2,2,2), lty = c(2, 1, 1) ) ## The function is currently defined as function (M, N) { options(warn = -1) if (messages(M) != 1) { return(messages(M)) } if (messages(N) != 1) { return(messages(N)) } if (M != N) { return(noquote(paste0("Addition has NOT a closed form of a LR fuzzy number"))) } else { a1 = M + N a2 = M + N a3 = M + N a4 = (M + N)/2 print(noquote(paste0("the result of addition is (core = ", a1, ", left spread = ", a2, ", right spread = ", a3, ")", if (a4 == 0) { paste0(" LR") } else if (a4 == 1) { paste0(" RL") } else { paste0(" L") }))) return(invisible(c(a1, a2, a3, a4))) } } ```

### Example output ```Attaching package: 'Calculator.LR.FNs'

The following object is masked from 'package:base':

sign

 the result of addition is  (core = 4, left spread = 1.1, right spread = 1.2) LR
 Addition has NOT a closed form of a LR fuzzy number
 the result of addition is  (core = 10, left spread = 0.2, right spread = 0.6) RL
 the result of addition is  (core = 2, left spread = 1.2, right spread = 0.4) LR
 the result of addition is  (core = 5, left spread = 1.7, right spread = 1.4) LR
 the result of addition is  (core = 4, left spread = 1.1, right spread = 1.2) LR
 the result of addition is  (core = 5, left spread = 1.7, right spread = 1.4) LR
 the result of addition is  (core = 5, left spread = 2.2, right spread = 4.8) LR
function (M, N)
{
options(warn = -1)
if (messages(M) != 1) {
return(messages(M))
}
if (messages(N) != 1) {
return(messages(N))
}
if (M != N) {
return(noquote(paste0("Addition has NOT a closed form of a LR fuzzy number")))
}
else {
a1 = M + N
a2 = M + N
a3 = M + N
a4 = (M + N)/2
print(noquote(paste0("the result of addition is  (core = ",
a1, ", left spread = ", a2, ", right spread = ",
a3, ")", if (a4 == 0) {
paste0(" LR")
}
else if (a4 == 1) {
paste0(" RL")
}
else {
paste0(" L")
})))
return(invisible(c(a1, a2, a3, a4)))
}
}
```

Calculator.LR.FNs documentation built on May 2, 2019, 8:25 a.m.