0% found this document useful (0 votes)
11 views26 pages

A Comprehensive Python Tool

This research paper presents a novel Python toolbox for handling Interval Valued Bipolar Neutrosophic Sets (IVBNSs), addressing the limitations of existing neutrosophic concepts in modeling uncertainty with both positive and negative aspects. The toolbox is designed to be user-friendly, open-source, and efficient, making it accessible for researchers and practitioners in various fields. The paper includes comprehensive definitions, operations, and practical examples to illustrate the toolbox's capabilities.

Uploaded by

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

A Comprehensive Python Tool

This research paper presents a novel Python toolbox for handling Interval Valued Bipolar Neutrosophic Sets (IVBNSs), addressing the limitations of existing neutrosophic concepts in modeling uncertainty with both positive and negative aspects. The toolbox is designed to be user-friendly, open-source, and efficient, making it accessible for researchers and practitioners in various fields. The paper includes comprehensive definitions, operations, and practical examples to illustrate the toolbox's capabilities.

Uploaded by

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

Journal of Fuzzy Extension and Applications

www.journal-fea.com

J. Fuzzy. Ext. Appl. Vol. 6, No. 1 (2025) 190–215.

Paper Type: Research Paper

A Comprehensive Python Tool for Interval Valued Bipolar Neutro-


sophic Sets and Operations

Pranesh Kumar S Prakash1 , Sofia Jennifer John2 , Kalaivani Chandran3 and


Florentin Smarandache4
1
Department of Information Technology, Sri Sivasubramaniya Nadar College of Engineering, Kalavakkam 603110, India; praneshku-
[email protected]
2
Department of Information Technology, Sri Sivasubramaniya Nadar College of Engineering, Kalavakkam 603110, India; sofiajen-
[email protected]
3
Department of Mathematics, Sri Sivasubramaniya Nadar College of Engineering, Kalavakkam 603110, India; [email protected].
4
Department of Mathematics and Science, University of New Mexico, Gallup, NM 87301, USA; [email protected]

Citation:
Received: 19-02-2024 Prakash, P. K. S., John, S. J., Chandran, K., & Smarandache, F.
(2024). A Comprehensive Python Tool for Interval Valued Bipolar
Revised: 20-04-2024
Neutro-sophic Sets and Operations.
Accepted: 11-7-2024 Journal of Fuzzy Extension and Applications,6(1), 190-215

Abstract

The increasing prominence of single-valued neutrosophic sets (SVNSs) and interval-valued neutrosophic
sets (IVNSs) among researchers has propelled their adoption in diverse real-world applications. These
concepts effectively tackle the inherent indeterminacy and inconsistent information prevalent in many
practical scenarios. While applications for IVNS environments have been established, this chapter proposes
a novel Python toolbox specifically designed for handling Interval Valued Bipolar Neutrosophic Sets
(IVBNSs) within the neutrosophic framework. The abstract provides comprehensive definitions for SVNSs,
IVNSs, and IVBNSs, along with detailed descriptions of their respective operations. Additionally, the
toolbox’s implementation and usage are vividly illustrated through practical examples.

Keywords: Exchange option, Lookback option, Black–Scholes Option pricing, Mesh-free method.

Corresponding Author: [email protected]


https://doi.org/10.22105/jfea.2024.446338.1395
Licensee System Analytics. This article is an open-access article distributed under the terms and conditions of the Creative
Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0).
A Comprehensive Python Tool for Interval Valued... 191

1|Introduction
Real-world problems are inherently complex and often riddled with uncertainty and inconsistency. Traditional
set-theoretic approaches, which rely on crisp boundaries between sets, struggle to effectively model these
complexities. Fuzzy set theory, introduced by Zadeh[27], offered a significant advancement by allowing elements
to have partial membership in a set. However, even fuzzy sets[27] have limitations in capturing the nuances of
uncertainty.

Atanassov[3, 2] is credited with introducing intuitionistic fuzzy sets, a specific type of fuzzy set that lays
some groundwork for understanding neutrosophic concepts. In response to limitations of classical fuzzy sets,
Smarandache extended the framework to form neutrosophic sets, including Single-valued neutrosophic sets
(SVNSs)[26] and Interval-valued neutrosophic sets (IVNSs). These neutrosophic sets provide a more general
framework to model uncertainty. They extend classical fuzzy sets by incorporating truth (T), indeterminacy
(I), and falsity (F) degrees, allowing for a richer representation of information. This generalization has fueled
applications in various domains, such as decision-making[25, 4, 18], image processing[23, 24], pattern recognition[8]
in fields like stock markets[6] and investment fidelities[8], cognitive modelling[9], performance evaluation and
assessment[17, 16] and medical diagnosis[22, 23, 1].

Despite their significance, these neutrosophic concepts have limitations in addressing certain types of uncertainty
and inconsistency. For instance, SVNSs and IVNSs cannot adequately represent situations where the truth
values have both positive and negative components. This limitation arises from the fact that SVNSs and IVNSs
only consider truth, indeterminacy, and falsity, while neglecting the possibility of both positive and negative
aspects of uncertainty.

To overcome this limitation, the concept of interval-valued bipolar neutrosophic sets (IVBNSs) was introduced.
IVBNSs extend IVNSs by incorporating an additional value, representing the bipolar aspect of uncertainty. This
addition allows for a more comprehensive and nuanced representation of uncertainty, enabling the modelling of
situations where both positive and negative aspects of uncertainty are present. Various versions of this has also
been used for solving linear programming problems and shortest path problems.[12, 11, 14]

Traditional set theory struggles to represent the inherent complexities of real-world problems. While fuzzy set
theory offers a significant advancement in modeling uncertainty by allowing partial membership in sets it falls
short in capturing situations with both positive and negative aspects of uncertainty. Smarandache developed a
more general framework that offered a richer representation of information known as neutrosophic sets.

However, the existing neutrosophic concepts like single-valued neutrosophic sets (SVNSs)[26] and interval-valued
neutrosophic sets (IVNSs)[5] have limitations in handling bipolar truth values. They struggle to represent
situations where the truth value has both positive and negative aspects. For instance, in the medical domain, on
diagnosis, a symptom might exhibit both favorable and unfavorable indicators for a disease.

To overcome these limitations and enable a more comprehensive representation of uncertainty, the concept of
interval-valued bipolar neutrosophic sets (IVBNSs) was introduced. IVBNSs extend IVNSs by incorporating an
additional truth value, allowing the modeling of both positive and negative aspects of uncertainty. Despite the
theoretical advantages of IVBNSs, their practical application is hindered by the lack of user-friendly computational
tools. This gap restricts researchers and practitioners from fully utilizing the potential of IVBNSs and the
proposed idea aims to bridge this gap.

On exploring the comparative landscape of toolboxes dedicated to Interval Valued Bipolar Neutrosophic Sets
(IVBNS) analysis and processing, the only framework available in the market is the Matlab platform. The
absence of a wider range of comparable tools underscores the novelty and potential significance of the Python
toolbox developed in this study. In terms of cost and accessibility, Matlab is proprietary with license costs
whereas the Python toolbox built is open-source and it allows the users to add and modify the source at free
cost. Secondly concerning size and resource utilization, the Python toolbox runs effectively even on systems
with limited computational resources and the proposed IVBNS framework involves no specific modules being
imported, and the implementation is written in simple methods hence the storage space is less than 17KB
whereas MATLAB is more resource-intensive, potentially impacting performance on lower-end machines. Thirdly
the proposed toolbox offers a user-friendly GUI, simplifying interaction and reducing the learning curve for users
192 Pranesh Kumar et al. | J. Fuzzy. Ext. Appl. 6(1) (2025) 190-215

unfamiliar with programming languages. In contrast, the existing MATLAB toolbox relies on a legacy interface,
tailored for users with programming expertise to navigate and utilize its functionalities effectively.
The proposed toolbox provides a comprehensive collection of functions for defining, manipulating, and analysing
IVBNSs. It also includes a command line user interface for realizing IVBNSs and their operations. The toolbox is
designed to be user-friendly and easy to use, making it accessible to a wide range of users, including researchers,
practitioners, and students.
Despite the theoretical advantages of IVBNSs, the lack of user-friendly computational tools hinders their practical
application. This paper aims to bridge this gap by proposing a novel Python toolbox specifically designed for
handling and manipulating IVBNSs.
This paper is organized as:
• A comprehensive introduction to SVNSs, IVNSs, and IVBNSs.
• A detailed description of the operations defined on IVBNSs.
• Implementation of a Python toolbox for handling IVBNSs.
• A command line interface for realizing IVBNSs and their operations.
• Demonstration of the toolbox’s capabilities through examples.
We believe this proposed toolbox will significantly enhance the applicability of IVBNSs in various real-world
domains, empowering researchers, and practitioners with a powerful tool for modelling and analysing uncertainty
and inconsistency.

2|Interval Valued Bipolar Neutrosophic Sets and its Implemen-


tation
We recall some basic definitions from the literature. We also give the python codes for the definitions. The
python implementations given are a slighlty modified version of [10]
Definition 0.1. [26] Let X be a universe of discourse. Then a single valued neutrosophic set is defined as:
AN S = {⟨x, TA (x), I A (x), FA (x)⟩ : x ∈ X}
which is characterised by a truth-membership function TA (x) : X → [0, 1], indeterminacy-membership function
IA (x) : X → [0, 1], and a falsity-membership function FA (x) : X → [0, 1]. There is no restriction on the sum of
TA (x), IA (x), FA (x) so 0 ≤ (TA (x) + IA (x) + FA (x)) ≤ 3

Here each element in Single Valued Neutrosophic Set is refered to as Single Valued Neutrosophic Number.
Definition 0.2. [7] A bipolar neutrosophic set A in X is defined as an object of the form
A = x, T + (x), I + (x), F + (x), T − (x), I − (x), F − (x) : x ∈ X


where T + , I + , F + : X → [1, 0] and T − , I − , F − : X → [−1, 0].

The positive membership degree T + (x), I + (x), F + (x) denotes the truth membershihp, indeterminate membership
and false membership of an element x ∈ X corrbership degree T − (x), I − (x), F − (x) denotes the truth membership,
indeterminate membership and false membership of an element x ∈ X to some implicit counter-property
corresponding to a bipolar neutrosophic set A.
Here, each and every element in Bipolar Neutrosophic Set is referred to as Bipolar Neutrosophic Element.
In this section, we will recall the definitions of IVBNS and their operations. Also, we will provide the Python
implementation and code for the same.
A Comprehensive Python Tool for Interval Valued... 193

Definition 0.3. [8] A interval valued bipolar neutrosophic set A in X is defined as an object of the form
A = TL+ (x), TR+ (x) , IL+ (x), IR +
(x) , FL+ (x), FR+ (x) ,
     
 −
TL (x), TR− (x) , IL− (x), IR

(x) , FL− (x), FR− (x)
    

where
TL+ (x), TR+ (x), IL+ (x), IR
+
(x), FL+ (x), FR+ (x) : X → [0, 1]
and
TL− (x), TR− (x), IL− (x), IR

(x), FL− (x), FR− (x) : X → [−1, 0]

In this context, every element present in Interval Valued Bipolar Neutrosophic Set is called as Interval Valued
Bipolar Neutrosophic Element.
The python code for the implementation of Interval Valued Bipolar Neutrosophic Element is provided below:
c l a s s IntervalValuedBipolarNeutrosophicElement :
d e f __init__ ( s e l f , parent ,
t r u t h _ p o s _ l e f t , truth_pos_right ,
indeterminacy_pos_left , indeterminacy_pos_right ,
falsity_pos_left , falsity_pos_right ,
t r u t h _ n e g _ l e f t , truth_neg_right ,
i n d e t e r m i n a c y _ n e g _ l e f t , in de te rm i na cy _n eg _r ig h t ,
falsity_neg_left , falsity_neg_right
):

assert 0 <= t r u t h _ p o s _ l e f t <= 1


assert 0 <= t r u t h _ p o s _ r i g h t <= 1
assert 0 <= i n d e t e r m i n a c y _ p o s _ l e f t <= 1
assert 0 <= i n d e t e r m i n a c y _ p o s _ r i g h t <= 1
assert 0 <= f a l s i t y _ p o s _ l e f t <= 1
assert 0 <= f a l s i t y _ p o s _ r i g h t <= 1
assert −1 <= t r u t h _ n e g _ l e f t <= 0
assert −1 <= t r u t h _ n e g _ r i g h t <= 0
assert −1 <= i n d e t e r m i n a c y _ n e g _ l e f t <= 0
assert −1 <= i n d e t e r m i n a c y _ n e g _ r i g h t <= 0
assert −1 <= f a l s i t y _ n e g _ l e f t <= 0
assert −1 <= f a l s i t y _ n e g _ r i g h t <= 0

self . parent = parent


self . truth_pos_left = truth_pos_left
self . truth_pos_right = truth_pos_right
self . indeterminacy_pos_left = indeterminacy_pos_left
self . indeterminacy_pos_right = indeterminacy_pos_right
self . falsity_pos_left = falsity_pos_left
self . falsity_pos_right = falsity_pos_right
self . truth_neg_left = truth_neg_left
self . truth_neg_right = truth_neg_right
self . indeterminacy_neg_left = indeterminacy_neg_left
self . indeterminacy_neg_right = indeterminacy_neg_right
self . falsity_neg_left = falsity_neg_left
self . falsity_neg_right = falsity_neg_right
194 Pranesh Kumar et al. | J. Fuzzy. Ext. Appl. 6(1) (2025) 190-215

The __str__ function in Python is overrided as shown below to display the string representation of Interval
Valued Bipolar Neutrosophic Element.
d e f __str__ ( s e l f ):
return (
f "<{ s e l f . parent } ,"
f "[{ self . truth_pos_left } , { s e l f . truth_pos_right } ] , "
f "[{ self . indeterminacy_pos_left } , { s e l f . indeterminacy_pos_right } ] , "
f "[{ self . falsity_pos_left } , { s e l f . falsity_pos_right }] ,"
f "[{ self . truth_neg_left } , { s e l f . truth_neg_right } ] , "
f "[{ self . indeterminacy_neg_left } , { s e l f . indeterminacy_neg_right } ] , "
f "[{ self . f a l s i t y _ n e g _ l e f t } , { s e l f . f a l s i t y _ n e g _ r i g h t }] >"
)Definition 0.4. [8] Let
A1 = T1L (x), T1R (x) , I1L (x), I1R (x) , F1L (x), F1R (x) ,
 + +
  + +
  + +

 − −
  − −
  − −
T1L (x), T1R (x) , I1L (x), I1R (x) , F1L (x), F1R (x)


and
A2 = T2L (x), T2R (x) , I2L (x), I2R (x) , F2L (x), F2R (x) ,
 + +
  + +
  + +

 − −
  − −
  − −
T2L (x), T2R (x) , I2L (x), I2R (x) , F2L (x), F2R (x)


be two interval valued bipolar neutrosophic elements.

For example, let us consider two Interval Valued Bipolar Neutrosophic Elements A1 and A2 .

A1 = ⟨[0.5, 0.6] , [0.2, 0.5] , [0.1, 0.7] ,


[−0.2, −0.1] , [−0.6, −0.2] , [−0.4, −0.3]⟩

and

A2 = ⟨[0.3, 0.4] , [0.1, 0.6] , [0.5, 0.7] ,


[−0.5, −0.1] , [−0.8, −0.7] , [−0.9, −0.8]⟩

[8]1. Then the complement of A1 is denoted by Ac1 and is defined by


C (x) = {1 } − T1R (x) C (x) = {1 } − I1R (x) C (x) = {1 } − F1R (x)
+ + + + + + + + +
T1L I1L F1L

C (x) = {1 } − T1L (x) C (x) = {1 } − I1L (x) C (x) = {1 } − F1L (x)


+ + + + + + + + +
T1R I1R F1R
− − − − − −
C (x) = {1 } − T1R (x) C (x) = {1 } − I1R (x) C (x) = {1 } − F1R (x)
− − −
T1L I1L F1L
− − − − − −
C (x) = {1 } − T1L (x) C (x) = {1 } − I1L (x) C (x) = {1 } − F1L (x)
− − −
T1R I1R F1R

for all x ∈ X.
The following is the code that computes the complement of Interval Valued Bipolar Neutrosophic Element.
d e f complement ( s e l f ) :
return IntervalValuedBipolarNeutrosophicElement (
s e l f . parent ,
1 − s e l f . truth_pos_right ,
1 − s e l f . truth_pos_left ,
A Comprehensive Python Tool for Interval Valued... 195

1 − s e l f . indeterminacy_pos_right ,
1 − s e l f . indeterminacy_pos_left ,
1 − s e l f . falsity_pos_right ,
1 − s e l f . falsity_pos_left ,
−1 − s e l f . truth_neg_right ,
−1 − s e l f . t r u t h _ n e g _ l e f t ,
−1 − s e l f . in de t er mi na cy _n eg _ ri gh t ,
−1 − s e l f . i n d e t e r m i n a c y _ n e g _ l e f t ,
−1 − s e l f . f a l s i t y _ n e g _ r i g h t ,
−1 − s e l f . f a l s i t y _ n e g _ l e f t ,
)

For our example, the complement of A1 , denoted by Ac1 is:

Ac1 = ⟨[0.4, 0.9] , [0.5, 0.9] , [0.6, 0.9] ,


[−0.8, −0.5] , [−0.7, −0.3] , [−0.8, −0.6]⟩

[8]2. Two Interval Valued Bipolar Neutrosophic Elements are said to be equal A1 = A2 if and only if
+
T1L (x) = T2L
+
(x) +
T1R (x) = T2R
+
(x) +
I1L (x) = I2L
+
(x) +
I1R (x) = I2R
+
(x)
− − − −
+
F1L (x) = F2L
+
(x) F1R
+
(x) = F2R
+
(x) T1L (x) = T2L (x) T1R (x) = T2R (x)
− − − − − − − −
I1L (x) = I2L (x) I1R (x) = I2R (x) F1L (x) = F2L (x) F1R (x) = F2R (x)

for all x ∈ X.
The following is the code that checks the equality of two IVBN elements. This is done by overriding the __eq__
function in Python.
d e f __eq__( s e l f , o t h e r ) :
if (
s e l f . p a r e n t == o t h e r . p a r e n t
and s e l f . t r u t h _ p o s _ l e f t == o t h e r . t r u t h _ p o s _ l e f t
and s e l f . t r u t h _ p o s _ r i g h t == o t h e r . t r u t h _ p o s _ r i g h t
and s e l f . i n d e t e r m i n a c y _ p o s _ l e f t == o t h e r . i n d e t e r m i n a c y _ p o s _ l e f t
and s e l f . i n d e t e r m i n a c y _ p o s _ r i g h t == o t h e r . i n d e t e r m i n a c y _ p o s _ r i g h t
and s e l f . f a l s i t y _ p o s _ l e f t == o t h e r . f a l s i t y _ p o s _ l e f t
and s e l f . f a l s i t y _ p o s _ r i g h t == o t h e r . f a l s i t y _ p o s _ r i g h t
and s e l f . t r u t h _ n e g _ l e f t == o t h e r . t r u t h _ n e g _ l e f t
and s e l f . t r u t h _ n e g _ r i g h t == o t h e r . t r u t h _ n e g _ r i g h t
and s e l f . i n d e t e r m i n a c y _ n e g _ l e f t == o t h e r . i n d e t e r m i n a c y _ n e g _ l e f t
and s e l f . i n d e t e r m i n a c y _ n e g _ r i g h t == o t h e r . i n d e t e r m i n a c y _ n e g _ r i g h t
and s e l f . f a l s i t y _ n e g _ l e f t == o t h e r . f a l s i t y _ n e g _ l e f t
and s e l f . f a l s i t y _ n e g _ r i g h t == o t h e r . f a l s i t y _ n e g _ r i g h t
):
r e t u r n True

return False

For our example, the two IVBNS elements A1 and A2 do not fulfill the requirements for equality, so they are not
equal. (A1 ̸= A2 )
196 Pranesh Kumar et al. | J. Fuzzy. Ext. Appl. 6(1) (2025) 190-215

[8]3. A IVBN element A1 is said to be a subset of another IVBN element A2 if and only if
+
T1L (x) ≤ T2L
+
(x) +
T1R (x) ≤ T2R
+
(x) +
I1L (x) ≥ I2L
+
(x) +
I1R (x) ≥ I2R
+
(x)
− − − −
+
F1L (x) ≥ F2L
+
(x) F1R
+
(x) ≥ F2R
+
(x) T1L (x) ≤ T2L (x) T1R (x) ≤ T2R (x)
− − − − − − − −
I1L (x) ≥ I2L (x) I1R (x) ≥ I2R (x) F1L (x) ≥ F2L (x) F1R (x) ≥ F2R (x)

for all x ∈ X.
The following code checks whether an IVBN element is a subset of the other.
def is_subset ( s e l f , other ) :
if (
s e l f . p a r e n t == o t h e r . p a r e n t
and s e l f . t r u t h _ p o s _ l e f t <= o t h e r . t r u t h _ p o s _ l e f t
and s e l f . t r u t h _ p o s _ r i g h t <= o t h e r . t r u t h _ p o s _ r i g h t
and s e l f . i n d e t e r m i n a c y _ p o s _ l e f t >= o t h e r . i n d e t e r m i n a c y _ p o s _ l e f t
and s e l f . i n d e t e r m i n a c y _ p o s _ r i g h t >= o t h e r . i n d e t e r m i n a c y _ p o s _ r i g h t
and s e l f . f a l s i t y _ p o s _ l e f t >= o t h e r . f a l s i t y _ p o s _ l e f t
and s e l f . f a l s i t y _ p o s _ r i g h t >= o t h e r . f a l s i t y _ p o s _ r i g h t
and s e l f . t r u t h _ n e g _ l e f t <= o t h e r . t r u t h _ n e g _ l e f t
and s e l f . t r u t h _ n e g _ r i g h t <= o t h e r . t r u t h _ n e g _ r i g h t
and s e l f . i n d e t e r m i n a c y _ n e g _ l e f t >= o t h e r . i n d e t e r m i n a c y _ n e g _ l e f t
and s e l f . i n d e t e r m i n a c y _ n e g _ r i g h t >= o t h e r . i n d e t e r m i n a c y _ n e g _ r i g h t
and s e l f . f a l s i t y _ n e g _ l e f t >= o t h e r . f a l s i t y _ n e g _ l e f t
and s e l f . f a l s i t y _ n e g _ r i g h t >= o t h e r . f a l s i t y _ n e g _ r i g h t
):
r e t u r n True

return False

For our example, the two IVBNS elements A1 and A2 do not fulfill the requirements for subset property, so A1
is not a subset of A2 (A1 ⊈ A2 )
[8]4. The union of two IVBN elements A1 and A2 is defined as

A1 ∪ A2 (x) =
max T1L (x), T2L (x) , max T1R (x), T2R (x) ,
  + +
 + +


min I1L (x), I2L (x) , min I1R (x), I2R (x) ,
  + +
 + +


min F1L (x), F2L (x) , min F1R (x), F2R (x) ,
  + +
 + +

 − −
 − −
min T1L (x), T2L (x) , min T1R (x), T2R (x) ,
 
 − −
 − −
max I1L (x), I2L (x) , max I1R (x), I2R (x) ,
 
 − −
 − −
max F1L (x), F2L (x) , max F1R (x), F2R (x)
 

for all x ∈ X.
The following code finds the union on two IVBN elements A1 and A2
d e f union ( s e l f , o t h e r ) :
return IntervalValuedBipolarNeutrosophicElement (
s e l f . parent ,
max( s e l f . t r u t h _ p o s _ l e f t , o t h e r . t r u t h _ p o s _ l e f t ) ,
A Comprehensive Python Tool for Interval Valued... 197

max( self . truth_pos_right , o t h e r . t r u t h _ p o s _ r i g h t ) ,


min ( self . indeterminacy_pos_left , other . indeterminacy_pos_left ) ,
min ( self . indeterminacy_pos_right , other . indeterminacy_pos_right ) ,
min ( self . falsity_pos_left , other . falsity_pos_left ) ,
min ( self . falsity_pos_right , other . falsity_pos_right ) ,
min ( self . truth_neg_left , other . truth_neg_left ) ,
min ( self . truth_neg_right , o t h e r . t r u t h _ n e g _ r i g h t ) ,
max( self . indeterminacy_neg_left , other . indeterminacy_neg_left ) ,
max( self . in de te rm in a cy _n eg _r ig ht , o t h e r . i n d e t e r m i n a c y _ n e g _ r i g h t ) ,
max( self . falsity_neg_left , other . falsity_neg_left ) ,
max( self . falsity_neg_right , other . falsity_neg_right ) ,
)

For our example, the union of the two IVBNS elements A1 and A2 , denoted by A1 ∪ A2 is:

A1 ∪ A2 = ⟨[0.3, 0.6] , [0.1, 0.5] , [0.1, 0.4] ,


[−0.5, −0.2] , [−0.7, −0.3] , [−0.4, −0.2]⟩

[8]5. The intersection of two IVBN elements A1 and A2 is defined as

A1 ∩ A2 (x) =
min T1L (x), T2L (x) , min T1R (x), T2R (x) ,
  + +
 + +


max I1L (x), I2L (x) , max I1R (x), I2R (x) ,
  + +
 + +


max F1L (x), F2L (x) , max F1R (x), F2R (x) ,
  + +
 + +

 − −
 − −
max T1L (x), T2L (x) , max T1R (x), T2R (x) ,
 
 − −
 − −
min I1L (x), I2L (x) , min I1R (x), I2R (x) ,
 
 − −
 − −
min F1L (x), F2L (x) , min F1R (x), F2R (x)
 

for all x ∈ X.
The following code finds the intersection between two IVBN elements A1 and A2
def i n t e r s e c t i o n ( s e l f , other ) :
return IntervalValuedBipolarNeutrosophicElement (
s e l f . parent ,
min ( s e l f . t r u t h _ p o s _ l e f t , o t h e r . t r u t h _ p o s _ l e f t ) ,
min ( s e l f . truth_pos_right , o t h e r . t r u t h _ p o s _ r i g h t ) ,
max( s e l f . i n d e t e r m i n a c y _ p o s _ l e f t , o t h e r . i n d e t e r m i n a c y _ p o s _ l e f t ) ,
max( s e l f . i n d e t e r m i n a c y _ p o s _ r i g h t , o t h e r . i n d e t e r m i n a c y _ p o s _ r i g h t ) ,
max( s e l f . f a l s i t y _ p o s _ l e f t , o t h e r . f a l s i t y _ p o s _ l e f t ) ,
max( s e l f . f a l s i t y _ p o s _ r i g h t , o t h e r . f a l s i t y _ p o s _ r i g h t ) ,
max( s e l f . t r u t h _ n e g _ l e f t , o t h e r . t r u t h _ n e g _ l e f t ) ,
max( s e l f . truth_neg_right , o t h e r . t r u t h _ n e g _ r i g h t ) ,
min ( s e l f . i n d e t e r m i n a c y _ n e g _ l e f t , o t h e r . i n d e t e r m i n a c y _ n e g _ l e f t ) ,
min ( s e l f . i n de te rm in ac y_ n eg _r ig ht , o t h e r . i n d e t e r m i n a c y _ n e g _ r i g h t ) ,
min ( s e l f . f a l s i t y _ n e g _ l e f t , o t h e r . f a l s i t y _ n e g _ l e f t ) ,
min ( s e l f . f a l s i t y _ n e g _ r i g h t , o t h e r . f a l s i t y _ n e g _ r i g h t ) ,
)
198 Pranesh Kumar et al. | J. Fuzzy. Ext. Appl. 6(1) (2025) 190-215

For our example, the intersection of the two IVBNS elements A1 and A2 , denoted by A1 ∩ A2 is:

A1 ∩ A2 = ⟨[0.1, 0.4] , [0.1, 0.6] , [0.5, 0.7] ,


[−0.5, −0.1] , [−0.8, −0.7] , [−0.9, −0.8]⟩

[8]6. The sum of two IVBN elements A1 and A2 is defined as

A1 + A2 =
T + T − T .T , T + T − T .T2R , I1L I2L , I1R I2R ,
+ + + + + + + +
   + + + +
 +1L + 2L+ +1L 2L −1R − 2R − 1R −

F1L F2L , F1R F2R , −T1L .T2L , −T1R T2R ,
− − − − − − − −
  
− −I1L − I2L − I1L .I2L , − −I1R − I2R − I1R .I2R ,
− − − − − − − −
  
− −F1L − F2L − F1L .F2L , − −F1R − F2R − F1R .F2R
The following code finds the sum of two IVBN elements A1 and A2 . This is done by overriding __add__
function in Python.
d e f __add__( s e l f , o t h e r ) :
return IntervalValuedBipolarNeutrosophicElement (
s e l f . parent ,
s e l f . truth_pos_left
+ other . truth_pos_left
− ( s e l f . truth_pos_left ∗ other . truth_pos_left ) ,
s e l f . truth_pos_right
+ other . truth_pos_right
− ( s e l f . truth_pos_right ∗ other . truth_pos_right ) ,
s e l f . indeterminacy_pos_left ∗ other . indeterminacy_pos_left ,
s e l f . indeterminacy_pos_right ∗ other . indeterminacy_pos_right ,
s e l f . falsity_pos_left ∗ other . falsity_pos_left ,
s e l f . falsity_pos_right ∗ other . falsity_pos_right ,
−1 ∗ s e l f . t r u t h _ n e g _ l e f t ∗ o t h e r . t r u t h _ n e g _ l e f t ,
−1 ∗ s e l f . t r u t h _ n e g _ r i g h t ∗ o t h e r . truth_neg_right ,
−1
∗ (
(−1 ∗ s e l f . i n d e t e r m i n a c y _ n e g _ l e f t )
− other . indeterminacy_neg_left
− ( s e l f . indeterminacy_neg_left ∗ other . indeterminacy_neg_left )
),
−1
∗ (
(−1 ∗ s e l f . i n d e t e r m i n a c y _ n e g _ r i g h t )
− other . indeterminacy_neg_right
− ( s e l f . indeterminacy_neg_right ∗ other . indeterminacy_neg_right )
),
−1
∗ (
(−1 ∗ s e l f . f a l s i t y _ n e g _ l e f t )
− other . falsity_neg_left
− ( s e l f . falsity_neg_left ∗ other . falsity_neg_left )
),
−1
A Comprehensive Python Tool for Interval Valued... 199

∗ (
(−1 ∗ s e l f . f a l s i t y _ n e g _ r i g h t )
− other . falsity_neg_right
− ( s e l f . falsity_neg_right ∗ other . falsity_neg_right )
),
)

For our example, the sum of the two IVBNS elements A1 and A2 , denoted by A1 + A2 is:

A1 + A2 = ⟨[0.37, 0.76] , [0.01, 0.3] , [0.05, 0.28] ,


[−0.25, −0.02] , [−0.94, −0.79] , [−0.94, −0.84]⟩

[8]7. The product of two IVBN elements A1 and A2 is defined as


A1 .A2 =
+ + + + +
+ I2L + + + +
 + I2R − I1R I2R
+ + +
   
 T+1L T2L ,+T1R T2R , I1L − I1L I2L , I1R ,
F + F − F F , F + F2R − F1R F2R ,
+ + + + + +
 1L −2L − 1L 2L− 1R −
 − − − −

− −T1L − T2L − T1L T2L , − −T1R − T2R − T1R T2R ,
− − − − − − − −
     
− I1L I2L , − I1R I2R , − F1L F2L , − F1R F2R
The following code finds the product of two IVBN elements A1 and A2 . This is done by overriding __mul__
function in Python.
d e f __mul__( s e l f , o t h e r ) :
return IntervalValuedBipolarNeutrosophicElement (
s e l f . parent ,
s e l f . truth_pos_left ∗ other . truth_pos_left ,
s e l f . t r u t h _ p o s _ r i g h t ∗ o t h e r . truth_pos_right ,
s e l f . indeterminacy_pos_left
+ other . indeterminacy_pos_left
− ( s e l f . indeterminacy_pos_left ∗ other . indeterminacy_pos_left ) ,
s e l f . indeterminacy_pos_right
+ other . indeterminacy_pos_right
− ( s e l f . indeterminacy_pos_right ∗ other . indeterminacy_pos_right ) ,
s e l f . falsity_pos_left
+ other . falsity_pos_left
− ( s e l f . falsity_pos_left ∗ other . falsity_pos_left ) ,
s e l f . falsity_pos_right
+ other . falsity_pos_right
− ( s e l f . falsity_pos_right ∗ other . falsity_pos_right ) ,
−1
∗ (
(−1 ∗ s e l f . t r u t h _ n e g _ l e f t )
− other . truth_neg_left
− ( s e l f . truth_neg_left ∗ other . truth_neg_left )
),
−1
∗ (
(−1 ∗ s e l f . t r u t h _ n e g _ r i g h t )
− other . truth_neg_right
− ( s e l f . truth_neg_right ∗ other . truth_neg_right )
),
200 Pranesh Kumar et al. | J. Fuzzy. Ext. Appl. 6(1) (2025) 190-215

−1 ∗ self . indeterminacy_neg_left ∗ other . indeterminacy_neg_left ,


−1 ∗ self . i n d e t e r m i n a c y _ n e g _ r i g h t ∗ o t h e r . i nd et er mi na c y_ ne g_ ri gh t ,
−1 ∗ self . falsity_neg_left ∗ other . falsity_neg_left ,
−1 ∗ self . falsity_neg_right ∗ other . falsity_neg_right ,
)

For our example, the product of the two IVBNS elements A1 and A2 , denoted by A1 .A2 is:

A1 .A2 = ⟨[0.03, 0.24] , [0.19, 0.8] , [0.55, 0.82] ,


[−0.75, −0.28] , [−0.56, −0.21] , [−0.36, −0.16]⟩

[8]8. The product of an IVBN element A1 and an integer scalar λ, λ > 0 is defined as
λA1 =
Dh i h i h λ i
+ λ λ λ λ λ
1 − 1 − TL , 1 − 1 − TR+ , IL+ , IR +
, FL+ , FR+
   
,
h  i h  i
− λ − λ − λ − λ
 
− −T , − −TR , − −IL , − −IR ,
h  L λ
  λ
iE
− 1 − 1 − −FL− , − 1 − 1 − −FR−
 

The following code finds the product of an IVBN element A1 and an integer λ. This is done by overriding
__mul__ function in Python.
d e f __mul__( s e l f , o t h e r ) :
return IntervalValuedBipolarNeutrosophicElement (
s e l f . parent ,
1 − pow ( 1 − s e l f . t r u t h _ p o s _ l e f t , o t h e r ) ,
1 − pow ( 1 − s e l f . truth_pos_right , o t h e r ) ,
pow ( s e l f . i n d e t e r m i n a c y _ p o s _ l e f t , o t h e r ) ,
pow ( s e l f . i n d e t e r m i n a c y _ p o s _ r i g h t , o t h e r ) ,
pow ( s e l f . f a l s i t y _ p o s _ l e f t , o t h e r ) ,
pow ( s e l f . f a l s i t y _ p o s _ r i g h t , o t h e r ) ,
−1 ∗ pow(−1 ∗ s e l f . t r u t h _ n e g _ l e f t , o t h e r ) ,
−1 ∗ pow(−1 ∗ s e l f . truth_neg_right , o t h e r ) ,
−1 ∗ pow(−1 ∗ s e l f . i n d e t e r m i n a c y _ n e g _ l e f t , o t h e r ) ,
−1 ∗ pow(−1 ∗ s e l f . in de te rm i na cy _n eg _r i gh t , o t h e r ) ,
−1 ∗ ( 1 − pow ( 1 − (−1 ∗ s e l f . f a l s i t y _ n e g _ l e f t ) , o t h e r ) ) ,
−1 ∗ ( 1 − pow ( 1 − (−1 ∗ s e l f . f a l s i t y _ n e g _ r i g h t ) , o t h e r ) ) ,
)

For our example, let us consider the scalar λ as 3. The product of a scalar and a IVBNS, denoted by 3A1 is:

3A1 = ⟨[0.271, 0.936] , [0.001, 0.125] , [0.001, 0.064] ,


[−0.125, −0.008] , [−0.343, −0.027] , [−0.784, −0.488]⟩

Now, combining both the code of the same function so that it performs multiplication operation accordingly,
based on the type of the multiplier.
d e f __mul__( s e l f , o t h e r ) :
i f i s i n s t a n c e ( other , i n t ) :
return IntervalValuedBipolarNeutrosophicElement (
s e l f . parent ,
1 − pow ( 1 − s e l f . t r u t h _ p o s _ l e f t , o t h e r ) ,
A Comprehensive Python Tool for Interval Valued... 201

1 − pow ( 1 − s e l f . truth_pos_right , o t h e r ) ,
pow ( s e l f . i n d e t e r m i n a c y _ p o s _ l e f t , o t h e r ) ,
pow ( s e l f . i n d e t e r m i n a c y _ p o s _ r i g h t , o t h e r ) ,
pow ( s e l f . f a l s i t y _ p o s _ l e f t , o t h e r ) ,
pow ( s e l f . f a l s i t y _ p o s _ r i g h t , o t h e r ) ,
−1 ∗ pow(−1 ∗ s e l f . t r u t h _ n e g _ l e f t , o t h e r ) ,
−1 ∗ pow(−1 ∗ s e l f . truth_neg_right , o t h e r ) ,
−1 ∗ pow(−1 ∗ s e l f . i n d e t e r m i n a c y _ n e g _ l e f t , o t h e r ) ,
−1 ∗ pow(−1 ∗ s e l f . in de te rm i na cy _n eg _r i gh t , o t h e r ) ,
−1 ∗ ( 1 − pow ( 1 − (−1 ∗ s e l f . f a l s i t y _ n e g _ l e f t ) , o t h e r ) ) ,
−1 ∗ ( 1 − pow ( 1 − (−1 ∗ s e l f . f a l s i t y _ n e g _ r i g h t ) , o t h e r ) ) ,
)
else :
return IntervalValuedBipolarNeutrosophicElement (
s e l f . parent ,
s e l f . truth_pos_left ∗ other . truth_pos_left ,
s e l f . t r u t h _ p o s _ r i g h t ∗ o t h e r . truth_pos_right ,
s e l f . indeterminacy_pos_left
+ other . indeterminacy_pos_left
− ( s e l f . indeterminacy_pos_left ∗ other . indeterminacy_pos_left ) ,
s e l f . indeterminacy_pos_right
+ other . indeterminacy_pos_right
− ( s e l f . indeterminacy_pos_right ∗ other . indeterminacy_pos_right ) ,
s e l f . falsity_pos_left
+ other . falsity_pos_left
− ( s e l f . falsity_pos_left ∗ other . falsity_pos_left ) ,
s e l f . falsity_pos_right
+ other . falsity_pos_right
− ( s e l f . falsity_pos_right ∗ other . falsity_pos_right ) ,
−1
∗ (
(−1 ∗ s e l f . t r u t h _ n e g _ l e f t )
− other . truth_neg_left
− ( s e l f . truth_neg_left ∗ other . truth_neg_left )
),
−1
∗ (
(−1 ∗ s e l f . t r u t h _ n e g _ r i g h t )
− other . truth_neg_right
− ( s e l f . truth_neg_right ∗ other . truth_neg_right )
),
−1 ∗ s e l f . i n d e t e r m i n a c y _ n e g _ l e f t ∗ o t h e r . i n d e t e r m i n a c y _ n e g _ l e f t ,
−1 ∗ s e l f . i n d e t e r m i n a c y _ n e g _ r i g h t ∗ o t h e r . i nd et er mi n ac y_ ne g_ ri g ht ,
−1 ∗ s e l f . f a l s i t y _ n e g _ l e f t ∗ o t h e r . f a l s i t y _ n e g _ l e f t ,
−1 ∗ s e l f . f a l s i t y _ n e g _ r i g h t ∗ o t h e r . f a l s i t y _ n e g _ r i g h t ,
)

[8]9. The score function S(A1 ) is defined as

S(A1 ) =
202 Pranesh Kumar et al. | J. Fuzzy. Ext. Appl. 6(1) (2025) 190-215
1
T + + TR+ + 1 − IL+ + 1 − IR
+
+ 1 − FL+ + 1
12 L Γ Γ Γ Γ Γ Γ Γ
−FR+ + 1 + TL− + 1 + TR− − IL− − IR

− FL− − FR− Γ


The following code finds the score function of the IVBN element A1
def score ( s e l f ) :
return (1 / 12) ∗ (
s e l f . truth_pos_left
+ s e l f . truth_pos_right
+ 1
− s e l f . indeterminacy_pos_left
+ 1
− s e l f . indeterminacy_pos_right
+ 1
− s el f . falsity_pos_left
+ 1
− s e l f . falsity_pos_right
+ 1
+ s e l f . truth_neg_left
+ 1
+ s e l f . truth_neg_right
− s e l f . indeterminacy_neg_left
− s e l f . indeterminacy_neg_right
− s e l f . falsity_neg_left
− s e l f . falsity_neg_right
)

For our example, the score value of A1 , denoted by S(A1 ) is: 0.5417
[8]10. The accuracy function A(A1 ) is defined as

A(A1 ) = TL+ + TRΓ+ F +


LΓ FR+ + TL− + TRΓ− F −
LΓ FR−

The following code finds the accuracy function of the IVBN element A1
def accuracy ( s e l f ) :
return (
s e l f . truth_pos_left
+ s e l f . truth_pos_right
− s e l f . falsity_pos_left
− s e l f . falsity_pos_right
+ s e l f . truth_neg_left
+ s e l f . truth_neg_right
− s e l f . falsity_neg_left
− s e l f . falsity_neg_right
)

For our example, the accuracy value of A1 , denoted by A(A1 ) is: 0.1
[8]11. The certainity function C(A1 ) is defined as

C(A1 ) = TL+ + TRΓ+ F −


LΓ FR−
A Comprehensive Python Tool for Interval Valued... 203

The following code finds the certiainity function of the IVBN element A1
def c e r t a i n i t y ( s e l f ) :
return (
s e l f . truth_pos_left
+ s e l f . truth_pos_right
− s e l f . falsity_neg_leftx
− s e l f . falsity_neg_right
)

For our example, the certainity value of A1 , denoted by C(A1 ) is: 1.3
Now, the Python code for Interval Valued Bipolar Neutrosophic Sets, which is a collection of several Interval
Valued Bipolar Neutrosophic Elements is given below:
class IntervalValuedBipolarNeutrosophicSet ( ) :
d e f __init__ ( s e l f ) :
s e l f . items = [ ]
s e l f . len = 0

d e f add_element ( s e l f , e l t ) :
i f not i s i n s t a n c e ( e l t , I n t e r v a l V a l u e d B i p o l a r N e u t r o s o p h i c E l e m e n t ) :
r a i s e TypeError ( " P l e a s e p r o v i d e t h e e l e m e n t a s I n t e r v a l Valued B i p o l a r N e u t r o s o p
else :
s e l f . i t e m s . append ( e l t )
s e l f . l e n += 1

d e f complement ( s e l f ) :
complement_set = I n t e r v a l V a l u e d B i p o l a r N e u t r o s o p h i c S e t ( )
f o r e l t in s e l f . items :
complement_set . add_element ( e l t . complement ( ) )
r e t u r n complement_set

d e f __eq__( s e l f , o t h e r ) :

if s e l f . l e n != o t h e r . l e n :
return False

f l a g = False
f o r i in range ( s e l f . len ) :
i f s e l f . i t e m s [ i ] == o t h e r . i t e m s [ i ] :
f l a g = True

i f not f l a g :
return False

r e t u r n True

def is_subset ( s e l f , other ) :

if s e l f . l e n != o t h e r . l e n :
return False
204 Pranesh Kumar et al. | J. Fuzzy. Ext. Appl. 6(1) (2025) 190-215

f l a g = False
f o r i in range ( s e l f . len ) :
i f s e l f . items [ i ] . is_subset ( other . items [ i ] ) :
f l a g = True

i f not f l a g :
return False

r e t u r n True

d e f union ( s e l f , o t h e r ) :

if s e l f . l e n != o t h e r . l e n :
r a i s e TypeError ( " S e t s a r e not o f t h e same s i z e ! " )

union_set = I n t e r v a l V a l u e d B i p o l a r N e u t r o s o p h i c S e t ( )

f o r i in range ( s e l f . len ) :
union_set . add_element ( s e l f . i t e m s [ i ] . union ( o t h e r . i t e m s [ i ] ) )

r e t u r n union_set

def i n t e r s e c t i o n ( s e l f , other ) :
i f s e l f . l e n != o t h e r . l e n :
r a i s e TypeError ( " S e t s a r e not o f t h e same s i z e ! " )

intersection_set = IntervalValuedBipolarNeutrosophicSet ()

f o r i in range ( s e l f . len ) :
i n t e r s e c t i o n _ s e t . add_element ( s e l f . i t e m s [ i ] . i n t e r s e c t i o n ( o t h e r . i t e m s [ i ] ) )

return intersection_set

d e f __add__( s e l f , o t h e r ) :
i f s e l f . l e n != o t h e r . l e n :
r a i s e TypeError ( " S e t s a r e not o f t h e same s i z e ! " )

sum_set = I n t e r v a l V a l u e d B i p o l a r N e u t r o s o p h i c S e t ( )

f o r i in range ( s e l f . len ) :
sum_set . add_element ( s e l f . i t e m s [ i ] + o t h e r . i t e m s [ i ] )

r e t u r n sum_set

d e f __mul__( s e l f , o t h e r ) :
product_set = IntervalValuedBipolarNeutrosophicSet ( )
i f i s i n s t a n c e ( other , i n t ) :
f o r i in range ( s e l f . len ) :
p r o d u c t _ s e t . add_element ( o t h e r ∗ s e l f . i t e m s [ i ] )
A Comprehensive Python Tool for Interval Valued... 205

e l i f i s i n s t a n c e ( other , IntervalValuedBipolarNeutrosophicSet ) :
f o r i in range ( s e l f . len ) :
p r o d u c t _ s e t . add_element ( s e l f . i t e m s [ i ] ∗ o t h e r . i t e m s [ i ] )

return product_set

def score ( s e l f ) :
score_result = [ ]

f o r e l t in s e l f . items :
s c o r e _ r e s u l t . append ( e l t . s c o r e ( ) )

return score_result

def accuracy ( s e l f ) :
accuracy_result = [ ]

f o r e l t in s e l f . items :
a c c u r a c y _ r e s u l t . append ( e l t . a c c u r a c y ( ) )

return accuracy_result

def c e r t a i n i t y ( s e l f ) :
certainity_result = [ ]

f o r e l t in s e l f . items :
c e r t a i n i t y _ r e s u l t . append ( e l t . c e r t a i n i t y ( ) )

return certainity_result

d e f __str__ ( s e l f ) :
string_to_be_returned = "{\n "
f o r i in range ( s e l f . len ) :
i f i +1 >= s e l f . l e n :
s t r i n g _ t o _ b e _ r e t u r n e d += " \ t " + s t r ( s e l f . i t e m s [ i ] ) + " \ n "
else :
s t r i n g _ t o _ b e _ r e t u r n e d += " \ t " + s t r ( s e l f . i t e m s [ i ] ) + " , \ n "

s t r i n g _ t o _ b e _ r e t u r n e d += " } "

return string_to_be_returned

3|Python Tool for IVBNS


On exploring the comparative landscape of toolboxes dedicated to Interval Valued Bipolar Neutrosophic Sets
(IVBNS) analysis and processing, the only framework available in the market is the Matlab platform. The
absence of a wider range of comparable tools underscores the novelty and potential significance of the Python
toolbox developed in this study. In terms of cost and accessibility, Matlab is proprietary with license costs
whereas the Python toolbox built is open-source and it allows the users to add and modify the source at free cost.
Secondly concerning size and resource utilization Python toolbox runs effectively even on systems with limited
206 Pranesh Kumar et al. | J. Fuzzy. Ext. Appl. 6(1) (2025) 190-215

computational resources and the proposed IVBNS framework involves no specific modules being imported and
the implementation is written in simple methods hence the storage space is less than 17KB whereas MATLAB
is more resource-intensive, potentially impacting performance on lower-end machines. Thirdly the proposed
toolbox offers a user-friendly GUI, simplifying interaction and reducing the learning curve for users unfamiliar
with programming languages. In contrast, the existing MATLAB toolbox relies on a legacy interface, tailored
for users with programming expertise to navigate and utilize its functionalities effectively. A snapshot of the
User Interface design of the proposed work is depicted in Figure 1 below.
In technical terms of unique features, the existing MATLAB toolbox[20] offers a valuable set of IVBNS operations,
whereas the Python toolbox expands upon this functionality by including additional and score operations for
usage in real-time applications.
The Python code for the IVBNS Toolbox, encompassing all functionalities and scripts necessary to run the
toolbox, is publicly available on GitHub for reproducibility and transparency. The code repository can be
accessed at https://github.com/praneshkumar-12/IVBNS-Toolbox

Figure 1. Example illustrating the IVBNS Toolbox Interface and its functionality
Design Choices:

Front-End Implementation: Hypertext Markup Language (HTML) and Cascading Style Sheets (CSS) were
employed for the front end due to their ubiquity and ease of development. This selection facilitates the creation
of a user-friendly interface and enables straightforward future modifications to the visual design.
Back-End Development: Python is chosen for the back-end due to its readability, extensive libraries, and
expressive syntax. These characteristics promote the development of concise and maintainable code, facilitating
the implementation of complex data structures and operations required for IVBNS manipulation.
A Comprehensive Python Tool for Interval Valued... 207

Object-Oriented Design: An Abstract Data Type (ADT) encapsulating the representation and operations of
IVBNS sets was implemented. This approach promotes data integrity, and reusability of the core logic, and
enforces constraints specific to IVBNS, ensuring accurate and reliable computations.
Client-Server Architecture: The application adheres to a client-server architecture, separating the presentation
layer (front-end) from the business logic layer (back-end). This promotes modularity, and scalability, and simplifies
maintenance of the application.

Data Structures:

The abstract data type (ADT) employed for representing Interval Valued Bipolar Neutrosophic Sets (IVBNS)
utilizes lists and arrays to store each set’s values and requisite attributes efficiently. These data structures
facilitate systematic organization and manipulation of IVBNS elements, enabling the seamless execution of
operations such as addition and subtraction. Furthermore, the ADT leverages dictionaries or key-value pairs to
store associated attributes such as membership functions, truth values, and indeterminacy values for individual
IVBNS elements. This structured approach ensures the preservation of IVBNS properties and facilitates precise
computations within the system.

Architecture Diagram:

This section presents a high-level overview of the system architecture employed in our work. We utilize a toolbox
analogy, where each component within the architecture represents a specific process with a designated function.
By understanding the architecture, you gain insight into how these tools work together to achieve the overall
functionality of this toolbox. The architecture diagram is depicted in Figure 2.

Figure 2. Architecture diagram of the IVBNS Toolbox

Technical Comparison with Existing Frameworks:

In technical aspects the existing MATLAB toolbox[20] offers a valuable set of IVBNS operations, whereas
the Python toolbox expands upon this functionality. The proposed work introduces additional operations not
currently available in the MATLAB toolbox. A comprehensive evaluation of the operations included in the
208 Pranesh Kumar et al. | J. Fuzzy. Ext. Appl. 6(1) (2025) 190-215

MATLAB toolbox is planned for future work. This comparative analysis will provide valuable insights into the
strengths and potential limitations of both toolboxes.

By offering a free, user-friendly interface, efficient resource utilization, and an extended set of operations,
the Python toolbox positions itself as a valuable alternative to existing MATLAB-based solutions for IVBNS
manipulation.

A thorough evaluation of the software has been done. All the inputs have been tested as well as compared with
manual calculations. Various test cases have been tested, including various formats of IVBNS, numbers out of
range, given input is not in the form of IVBNS and so on. All the test cases have been passed and is reliable and
robust. Sample test cases have been illustrated from figures Figure 3 to Figure 10.

Figure 3. A Sample Test Case for Invalid Input

4|Numerical Result
To illustrate the system, we use set C1 and set C2 as the following. They contain random IVBNS numbers. The
results have been tested and compared with manual solutions. We make a detailed tracing to make sure the
accuracy of the results.

⟨A1 , [0.5, 0.6] , [0.2, 0.5] , [0.1, 0.7] , [−0.2, −0.1] , [−0.6, −0.2] , [−0.4, −0.3]⟩ ,
 
C1 =
⟨A2 , [0.1, 0.2] , [0.3, 0.8] , [0.2, 0.4] , [−0.5, −0.2] , [−0.9, −0.3] , [−0.6, −0.1]⟩

⟨A1 , [0.3, 0.9] , [0.1, 0.8] , [0.2, 0.5] , [−0.8, −0.7] , [−0.5, −0.1] , [−0.4, −0.1]⟩ ,
 
C2 =
⟨A2 , [0.2, 0.8] , [0.1, 0.4] , [0.3, 0.4] , [−0.5, −0.1] , [−0.9, −0.4] , [−0.3, −0.1]⟩
A Comprehensive Python Tool for Interval Valued... 209

The complement of C1 = (C1 )c is calculated as:

Figure 4. Sample Test Case for Complement

The score of C1 is calculated as:

Figure 5. Sample Test Case for Score


210 Pranesh Kumar et al. | J. Fuzzy. Ext. Appl. 6(1) (2025) 190-215

The accuracy of C1 is calculated as:

Figure 6. Sample Test Case for Accuracy

The union of C1 and C2 , C1 ∪ C2 is calculated as:

Figure 7. Sample Test Case for Union


A Comprehensive Python Tool for Interval Valued... 211

The intersection of C1 and C2 , C1 ∩ C2 is calculated as:

Figure 8. Sample Test Case for Intersection

The product of C1 and C2 , C1 × C2 is calculated as:

Figure 9. Sample Test Case for Multiplication


212 Pranesh Kumar et al. | J. Fuzzy. Ext. Appl. 6(1) (2025) 190-215

The below operation checks if C1 is subset of C2 , C1 ⊂ C2 :

Figure 10. Sample Test Case for Subset

5|Conclusion
Let us consider a decision making problem adapted from Ye [13]. There is an investment company, which wants
to invest a sum of money in the best option. There is a panel with the set of the four alternatives is denoted by
C1 = car company, C2 = food company and C3 = computer company.
The investment company must take a decision according to the set of the two attributes for each company and is
denoted by A1 = growth and A2 = risk. Then according to the algorithm, we have:
Step 1:

Construct the required decision IVBNS.

Company 1.
⟨A1 , [0.5, 0.6] , [0.2, 0.5] , [0.1, 0.7] , [−0.2, −0.1] , [−0.6, −0.2] , [−0.4, −0.3]⟩ ,
 
C1 =
⟨A2 , [0.1, 0.2] , [0.3, 0.8] , [0.2, 0.4] , [−0.5, −0.2] , [−0.9, −0.3] , [−0.6, −0.1]⟩

Company 2.
⟨A1 , [0.3, 0.9] , [0.1, 0.8] , [0.2, 0.5] , [−0.8, −0.7] , [−0.5, −0.1] , [−0.4, −0.1]⟩ ,
 
C2 =
⟨A2 , [0.2, 0.8] , [0.1, 0.4] , [0.3, 0.4] , [−0.5, −0.1] , [−0.9, −0.4] , [−0.3, −0.1]⟩

Company 3.
⟨A1 , [0.1, 0.6] , [0.1, 0.5] , [0.1, 0.4] , [−0.5, −0.2] , [−0.7, −0.3] , [−0.4, −0.2]⟩ ,
 
C3 =
⟨A2 , [0.3, 0.4] , [0.1, 0.6] , [0.5, 0.7] , [−0.5, −0.1] , [−0.8, −0.7] , [−0.9, −0.8]⟩

Step 2:

Compute the score value for each element in the IVBNS. Then find out the ratio between them.
S(C1 [A1 ]) = 0.57
S(C1 [A2 ]) = 0.48
A Comprehensive Python Tool for Interval Valued... 213

Calculating the growth risk ratio,


0.57
S(C1 ) = = 1.1875
0.48

S(C2 [A1 ]) = 0.43


S(C2 [A2 ]) = 0.575

Calculating the growth risk ratio,


0.43
S(C2 ) = = 0.748
0.575

S(C3 [A1 ]) = 0.542


S(C3 [A2 ]) = 0.617

Calculating the growth risk ratio,


0.542
S(C3 ) = = 0.878
0.617

Step 3:

Rank all the systems according to the score value as: S(C1 ) > S(C3 ) > S(C2 ) and thus, C1 is the most desirable
alternative to invest in.
This research proposes a scalable approach, similar to [19], for selecting the optimal private-sector partner in
large-scale projects, considering risk factors within a neutrosophic environment.

6|Conclusion
The development of the Interval Valued Bipolar Neutrosophic Sets (IVBNS) framework marks a significant
advancement in the field of imprecise information processing. This novel framework, coupled with the accom-
panying Python toolbox, provides a comprehensive and user-friendly platform for effectively modeling and
analyzing imprecise and inconsistent information prevalent in real-world applications. The IVBNS framework’s
inherent ability to handle fuzziness and uncertainties makes it particularly well-suited for image processing and
segmentation tasks, particularly in medical imaging, where accurate segmentation is crucial for diagnosis and
treatment planning.
Moving forward, we envision the IVBNS framework’s applicability expanding to encompass a broader range of
image processing and segmentation tasks. Our immediate focus lies in enhancing the accuracy and robustness of
image segmentation algorithms for medical imaging and other applications involving uncertain or imprecise data.
Additionally, we aim to delve deeper into the theoretical underpinnings of IVBNS and explore its potential for
solving complex problems in diverse domains, including decision-making under uncertainty, pattern recognition,
and data analysis.[15] The IVBNS framework holds immense promise for revolutionizing the field of imprecise
information processing and paving the way for groundbreaking research and innovation.

7|Future Directions
Future research directions in neutrosophic software development includes:
• Expanding the functionalities of existing toolboxes to encompass a wider range of neutrosophic set types,
including IVBNSs.
214 Pranesh Kumar et al. | J. Fuzzy. Ext. Appl. 6(1) (2025) 190-215

• Integrating neutrosophic set processing capabilities into existing software frameworks used in specific
application domains (e.g., decision-making, engineering analysis). In the image processing domain, the
significance of bipolar NS values can be used to differentiate the background and foreground images .
This idea can be incorporated in dealing with segmentation.
• Developing user-friendly interfaces for neutrosophic software tools to enhance accessibility and usability
for researchers and practitioners with varying levels of expertise.
By addressing these directions, the field of neutrosophic computing can move towards more robust and user-centric
software tools, ultimately facilitating the broader adoption of neutrosophic theories in real-world applications.

Acknowledgements and Funding


The authors would like to express their sincere gratitude to the editor as well as the reviewers for their valuable
suggestions. The authors declare that no research funding was received for this research work.

Author Contributions
Pranesh Kumar S P: Methodology, Analysis, Programming, Writing - Original Draft
Sofia Jennifer J: Conceptualization, Supervision, Writing - Review & Editing
Kalaivani C: Methodology, Data interpretation, Writing - Review & Editing
Florentin S: Validation, Writing - Review & Editing.

Data Availability
All data and resources utilized in this research are detailed within the manuscript. Additionally, relevant online
resources are hyperlinked within the text for further exploration.

Conflicts of Interest
The authors declare that they have no conflict of interest.

References
[1] Abdullah, W. (2024). A study of neutrosophic sets and deep learning models for breast cancer classification Multicriteria
Algorithms with Applications, 3, 50-59. https://doi.org/10.61356/j.mawa.2024.3237
[2] Atanassov, K.T. (1999). Interval valued intuitionistic fuzzy sets. Intuitionistic Fuzzy Sets: Theory and Applications, 35, (pp.
139-177). Physica, Heidelberg. https://doi.org/10.1007/978-3-7908-1870-3_2
[3] Atanassov, K.T. (1999). Interval valued intuitionistic fuzzy sets. Intuitionistic Fuzzy Sets: Studies in Fuzziness and Soft
Computing, 35. Physica, Heidelberg. https://doi.org/10.1007/978-3-7908-1870-3_2
[4] Bhat, S. A. (2023). An enhanced AHP group decision making model employing neutrosophic trapezoidal numbers. Journal of
Operational and Strategic Analytics, 1(2), 81-89. https://doi.org/10.56578/josa010205
[5] Bhattacharya, P., & Pramanik, P. (2014). Some concepts on interval valued refined neutrosophic sets and their applications
Notes on Intuitionistic Fuzzy Sets, 20(2), 31-44.
[6] Veeramani, C., Venugopal. R., & Edalatpanah, S. A. (2022). Neutrosophic DEMATEL approach for financial ratio performance
evaluation of the NASDAQ Exchange. Neutrosophic Sets and Systems, 51, 766–782. https://doi.org/10.5281/zenodo.7135415
[7] Deli, I., Ali, M., & Smarandache, F. (2015). Bipolar neutrosophic sets and their application based on multi-criteria decision
making problems. International Conference on Advanced Mechatronic Systems (ICAMechS), (pp. 249-254). Beijing, China.
https://doi.org/10.1109/ICAMechS.2015.7287068
[8] Deli, I., Şubaş, Y., Smarandache, F., & Ali, M. (2016). Interval valued bipolar neutrosophic sets and their application in pattern
recognition. arXiv:1601.01266 [math.GM]. https://doi.org/10.48550/arXiv.1601.01266
[9] Kandasamy, I. et al., (2023). NCMPy: A modelling software for neutrosophic cognitive maps based on python package.
Neutrosophic Systems with Applications, 13, 1-22. https://doi.org/10.61356/j.nswa.2024.114
[10] El-Ghareeb., & Haitham, A. (2019). Novel open source python neutrosophic package. Neutrosophic Sets and Systems, 25(1).
https://digitalrepository.unm.edu/nss_journal/vol25/iss1/11
[11] Eskandari, S. (2022). PyIT-MLFS: A Python based information theoretical multi label feature selection library. International
Journal of Research in Industrial Engineering, 11(1), 9–15. https://doi.org/10.22105/riej.2022.308916.1252
A Comprehensive Python Tool for Interval Valued... 215

[12] Hosseinzadeh, E., & Tayyebi, J. (2023). A compromise solution for the neutrosophic multi-objective linear programming
problem and its application in transportation problem. Journal of Applied Research on Industrial Engineering, 10(1), 1-10.
https://doi.org/10.22105/jarie.2022.328580.1451
[13] Ye, Jun. (2014). Vector similarity measures of simplified neutrosophic sets and their application in multicriteria decision making.
International Journal of Fuzzy Systems, 16, 204-211.
[14] Kumar, R., Edalatpanah, S. A., Jha, S., & Singh, R. (2019). A novel approach to solve gaussian valued neutrosophic shortest
path problems. International Journal of Engineering and Advanced Technology, 8(3), 347 – 353.
[15] Nordo, G., Jafari, S., Mehmood, A., & Bhimraj, B. (2024). A Python framework for neutrosophic sets and mappings. Soft and
Neutrosophic Topology Lab, 65, 199-236.
[16] M. Sallam, K., & Mohamed, A. W. (2023). Single valued neutrosophic sets for assessment quality of suppliers under uncertainty
environment. Multicriteria Algorithms With Applications, 1, 1-10. https://doi.org/10.61356/j.mawa.2023.15861
[17] Mohanta, K. K., & Toragay, O. (2023). Enhanced performance evaluation through neutrosophic data envelopment
analysis leveraging pentagonal neutrosophic numbers. Journal of Operational and Strategic Analytics, 1(2), 70-80.
https://doi.org/10.56578/josa010204
[18] Nagarajan, D., Kanchana, A., Jacob, K. et al. (2023). A novel approach based on neutrosophic Bonferroni mean operator of
trapezoidal and triangular neutrosophic interval environments in multi-attribute group decision making. Sci Rep, 13, 10455.
https://doi.org/10.1038/s41598-023-37497-z
[19] Saberhoseini, S. F., Edalatpanah, S. A., & Sorourkhah, A. (2022). Choosing the best private sector part-
ner according to the risk factors in neutrosophic environment. Big Data and Computing Visions, 2(2), 61-68.
https://doi.org/10.22105/bdcv.2022.334005.1075
[20] Broumi, S. (2024). Toolbox for the interval valued bipolar neutrosophic matrices. MATLAB Central File Exchange,
https://www.mathworks.com/matlabcentral/fileexchange/71735-toolbox-for-the-interval-valued-bipolar-neutrosophic-matrice
[21] Smarandache, F. (2014). A unifying field in logics neutrosophic logic neutrosophy neutrosophic set neutrosophic probability and
statistics. American Research Press,Rehoboth, http://dx.doi.org/10.6084/M9.FIGSHARE.1014204
[22] Jennifer, S. J., & Sharmila, S. T. (2023). A neutrosophic set approach on chest X-Rays for automatic lung infection detection
Information Technology and Control, 52, 37-52. https://doi.org/10.5755/j01.itc.52.1.31520
[23] Jennifer, S. J., & Sharmila, S. T. (2022). Neutrosophic approach for glaucoma detection in retinal images, Proceedings of The
Romanian Academy, Series A , 23(4), (pp. 389 - 398). https://acad.ro/sectii2002/proceedings/doc2022-4/09-Sofia-Jennifer.pdf
[24] Jennifer, S. J., & Sharmila, S. T. (2022). Neutrosophic approach of segmentation on thermal images case study drowsy driving
application. NeuroQuantology: An Interdisciplinary Journal of Neuroscience and Quantum Physics, 20(8), 1-10.
[25] Uluçay, V., Deli, I. & Şahin, M. (2018). Similarity measures of bipolar neutrosophic sets and their application to multiple
criteria decision making Neural Computing & Applications, 29(12), 739–748. https://doi.org/10.1007/s00521-016-2479-1
[26] Wang, H., Smarandache, F., Zhang, Y., & Sunderraman, R. (2012). Single valued neutrosophic sets. Infinite study, 10, 10-14.
[27] Zadeh L.A. (1965). Fuzzy sets, Information and Control, 8(3), 338-353. https://doi.org/10.1016/S0019-9958(65)90241-X

You might also like