(Artigo) A New Algorithmic Decision For Categorical Syllogisms Via Carroll's Diagrams (2019)

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Soft Computing

https://doi.org/10.1007/s00500-019-04598-9

METHODOLOGIES AND APPLICATION

A new algorithmic decision for categorical syllogisms via Carroll’s


diagrams
Necla Kircali Gursoy2 · Ibrahim Senturk1 · Tahsin Oner1 · Arif Gursoy1

© Springer-Verlag GmbH Germany, part of Springer Nature 2019

Abstract
In this paper, we propose a new effective algorithm for the categorical syllogisms by using a calculus system Syllogistic
Logic with Carroll Diagrams, which determines a formal approach to logical reasoning with diagrams, for representations
of the fundamental Aristotelian categorical syllogisms. We show that this logical reasoning is closed under the syllogistic
criterion of inference. Therefore, the calculus system is implemented to let the formalism which comprises synchronically
bilateral and trilateral diagrammatical appearance and naive algorithmic nature. And also, there is no need specific knowledge
or exclusive ability to understand this decision procedure as well as to use it in an algorithmic system. Consequently, the
empirical contributions of this paper are to design a polynomial-time algorithm at the first time in the literature to conduce
to researchers getting into the act in different areas of science used categorical syllogisms such as artificial intelligence,
engineering, computer science and etc.

Keywords Categorical syllogism · Validity · Deduction · Decision algorithm · Complexity

1 Introduction uation became reversed once again. Thereby the categorical


syllogistic system played an important role in the mainstream
The first idea on syllogisms was produced in the field of of contemporary formal logic. Furthermore, Łukasiewicz
proper thinking by the Greek philosopher Aristotle. His idea axiomatization on syllogisms is still open and new ideas
mainly said in Prior Analytics that “A syllogism is discourse arise from time to time. In recent years, the using of
in which, certain things being stated, something other than Łukasiewicz syllogistic systems or decision methods have
what is stated follows of necessity from their being so. I mean been extensively tackled and investigated under different
by the last phrase that they produce the consequence, and by treatments in computer science such that the authors dis-
this, that no further term is required from without in order to cuss the propositional satisfiability problem and thus indicate
make the consequence necessary” (Barnes 2014). the incompleteness of some proof-systems that have been
Throughout the centuries, the categorical syllogistic sys- proposed for the numerically definite syllogisms (Pratt-
tem was a paramount part of logic. After innovations in Hartmann and Moss 2009); in engineering such that fuzzy
the scope of mathematical logic in the last part of the 19th reasoning is linked with many-valued logic framework (Niit-
century and the beginning part of the 20th century, the sit- tymäki and Turunen 2003); in artificial intelligence such that
uation improbably changed. However, when Łukasiewicz the syllogistic method of reasoning lends itself to a com-
introduced syllogisms building as an axiomatic system on putationally efficient implementation and thereby provides
classical propositional calculus (Łukasiewicz 1957), the sit- an useful tool for the management of uncertainty in expert
systems (Zadeh 1985); in scientific instruments such that
(Moktefi 2017) offers the importance of the diagrams as a
Communicated by V. Loia.
scientific instrument. And also, computer science oriented
B Tahsin Oner logicians begin to take part in Rocha and Meseguer (2007)
tahsin.oner@ege.edu.tr via presenting an equational decision procedure for the syl-
1 logistic logic with complements.
Department of Mathematics, Faculty of Science,
Ege University, Izmir, Turkey Using diagrams in formal logical reasoning has created
2 a spate of interest for years because the researchers need to
Tire Kutsan Vocational School, Ege University, Izmir, Turkey

123
N. Kircali Gursoy et al.

them to visualize complex logic problems that are difficult 2 Preliminaries


to understand. For this aim, at the end of the 19th century,
Lewis Carroll used an original diagrammatic scheme to visu- In this section, we sketch out notations, terminology and
alize categorical syllogisms in his book (Carroll 1985). As background which are used during this manuscript.
the modification of Venn diagrams, he used literal diagrams A categorical syllogism can be defined as a deductive argu-
to solve categorical syllogistic problems containing 2-terms, ment consisting of two logical propositions and a conclusion
3-terms and so on. The related works about formal’s and obtained from these propositions. They contain exactly three
visual’s logic of Lewis Carroll are examined by Abeles (2005, terms, each of which occurs in exactly two of the constituent
2007) and Lewis (2008). In addition to them, using diagrams propositions and the conclusion, where the propositions and
in computer systems is a significant topic today because it the conclusion each have a quantified relationship between
has the potential in offering systems which are more clear two terms. The objects in a categorical proposition are related
and flexible to perform. to the following four distinct forms as in Table 1.
Nowadays, the common problem of various systems is For any syllogism, the categorical propositions are com-
that they are too complicated to be understood and used. posed of three terms, a subject term, a predicate term and a
So, we need to use diagrams or other graphical representa- middle term: the subject term is the subject of the conclusion
tions to develop more effective and efficient problem solving and denoted by S; the predicate term modifies the subject in
as similarly provided by Nakatsu (2014) who use Venn dia- the conclusion and denoted by P, and the middle term which
gramming method for syllogistic reasoning. And, we present occurs in the two premises and links the subject and predi-
an algorithm by using Carroll’s diagrams to solve this prob- cate terms and noted by M. The subject and predicate terms
lem as proposed by Kumova and Cakir (2010) who give the occur in different premises but the middle term occurs once
algorithm to facilitate modeling possibly any sort of consis- in each premise. The premise which consists of the predicate
tent, inconsistent or approximate human reasoning. On the term and the middle term is called the major premise; the
contrary, the applications of diagrammatic reasoning in the premise which consists of the subject term and the middle
cognitive sciences seek a solution how to support learners term is called the minor premise.
in complex tasks typically with paper-based or more “static” Categorical syllogisms are grouped into 4 different ways,
diagrams (Mayer 1992, 2009), the applications more typi- which are traditionally called figures, depending on the posi-
cally include how to program a computer to carry out these tion of the term-variables S, P and M in Table 2 (Turunen
tasks in artificial intelligence (Glasgow et al. 1995). An exam- 2014).
ple of problem solving of complex problems is given by Aristotle identified only the first three figures, but the last
Deng et al. (2017). Besides, for more details the readers can one was discovered in the middle ages. He searched for each
find some related works about using diagrams of syllogisms, mood and figure in terms of whether it was valid or not.
learning systems and prediction of performance in different After, he obtained some common properties of these syllo-
areas such as Zhao et al. (2019a, b), Castro-Manzano (2017, gisms, which are called rules of deduction. These rules are
2015), Moktefi and Shin (2012), Senturk et al. (2016), Skliar as follows:
et al. (2015), Carroll (2018).
In this paper, at the first time in the literature, we present
an effective algorithm for the categorical syllogisms by using Table 1 Categorical syllogistic propositions
a calculus system Syllogistic Logic with Carroll Diagrams
Symbol Statements Generic term
(SLCD), which gives a formal approach to logical reasoning
with diagrams, for representations of the fundamental Aris- A All X are Y Universal affirmative
totelian categorical syllogisms. The empirical contributions E No X are Y Universal negative
of this paper are to design a polynomial-time algorithm to I Some X are Y Particular affirmative
contribute to researchers getting into the act in different areas O Some X are not Y Particular negative
of science used categorical syllogisms such as artificial intel-
ligence, engineering, computer science. In Sect. 2, we recall
some notions, basic definitions for Aristotelian categorical Table 2 Categorical syllogistic figures
syllogisms. In Sect. 3, we represent categorical syllogisms
Major Minor Conclusion Figure
by the help of Carroll diagrams and we construct a calculus
system to decide whether the syllogisms or the strengthened M−P S−M S−P I
syllogisms are valid or not. In Sect. 4, we give a new algo- P−M S−M S−P II
rithm by the help of this calculus system to provide a basis M−P M−S S−P III
when researchers need to use categorical syllogisms for giv- P−M M−S S−P IV
ing an exact decision.

123
A new algorithmic decision for categorical syllogisms via Carroll’s diagrams

Table 3 Unconditionally valid forms Table 4 Conditionally valid forms


Figure I Figure II Figure III Figure IV Figure I Figure II Figure III Figure IV Necessary condition

AAA E AE I AI AE E A AI A AO AE O S exists
E AE AE E AI I I AI E AO E AO S exists
AI I EIO O AO EIO A AI E AO M exists
EIO AO O EIO EIO M exists
A AI P exists

Step 1 Relating to premises irrespective of conclusion or fig-


ure: diagram. Afterward, a general operation table containing all
possible conclusions is given by explaining how the conclu-
(a) No inference can be made from two particular premises. sions are derived from the possible values of the categorical
(b) No inference can be made from two negative premises. propositions corresponding to the major and minor premises.
Finally, we present some theorems clarifying the constitu-
Step 2 Relating to propositions irrespective of figure: tion of conditional or unconditional conclusion sets from the
major and minor premises using the operation of possible
(a) If one premise is particular, the conclusion must be par- conclusion table. In the sequel, we decide whether the syllo-
ticular. gisms generated with the premises and their conclusion are
(b) If one premise is negative, the conclusion must be neg- valid in the calculus system SLCD.
ative. Carroll’s diagrams thought up in 1884 are Venn-type dia-
grams where the universes are represented with a square.
Step 3 Relating to the distribution of terms: Nevertheless, it is not clear whether Carroll studied his dia-
grams independently or as a modification of John Venn’s.
(a) The middle term must be distributed at least once. Carroll’s scheme looks like a productive method summing-
(b) A predicate distributed in the conclusion must be dis- up several developments that have been introduced by
tributed in the major premise. researchers studying in this area (Moktefi and Shin 2012).
(c) A subject distributed in the conclusion must be dis-
tributed in the minor premise. 3.1 Explaining propositions by Carroll diagrams

In the categorical syllogistic system, there are 64 different We describe a homomorphic mapping between the categor-
syllogistic forms for each figure. These are called moods. ical syllogistic propositions and Carroll’s diagrams for the
Therefore, the categorical syllogistic system is composed of calculus system SLCD.
256 possible syllogisms. Only 24 of them are valid in this Let X and Y be two terms and let X  and Y  be com-
system. And they divided into two groups of 15 and 9. plements of X and Y , respectively. For two terms, Carroll
The syllogisms in the first group are valid unconditionally divides the square into four cells, by this means he gets the
which are given in Table 3. so-called bilateral diagram, as given in Table 5.
The syllogisms in the second group called strengthened Each of these four cells can have three possibilities when
syllogism are valid conditionally or valid existential import, we explain the relations between two terms. They can be 0 or
which is an explicit supposition of being of some terms, are 1 or blank. In this method, 0 means that there is no element
given in Table 4. intersection cell of two elements, 1 means that it is not empty
and blank cell means that we don’t have any idea about the
content of the cell, it could be 0 or 1.
3 Representation of categorical syllogisms As in the above method, let X , Y and M be three terms and
via Carroll’s diagrams and a calculus X  , Y  and M  be complements of X , Y and M, respectively.
system SLCD For examining all relations between three terms, he added
one more square in the middle of the bilateral diagram which
In this section, first of all we state propositions and their is called the trilateral diagram, as in Table 6.
relations with each other by the help of Carroll bilateral and Each cell in a trilateral diagram is marked with a 0, if there
trilateral diagrams, respectively. Then, we explain how all the is no element and is marked with an I if it is not empty and
possible diagrams of these bilateral diagrams are obtained another using of I, it could be on the line where the two cells
and give a mapping that assigns a value to each possible is intersection, this means that at least one of these cells is

123
N. Kircali Gursoy et al.

Table 5 Relation of two terms X X Table 7 The paradigm for the representation of syllogistic arguments
Y XY  XY  by using sets
Y XY XY LOGIC DIAGRAMS SETS
T ranslate
PREMISES Propositions −−−−−−−→ Sets

T ranslate
CONCLUSIONS Propositions ←−−−−−−− Sets
Table 6 Relations of three
terms

Table 8 Bilateral diagram for a pi X X


quantitative relation between X Y n1 n2
and Y Y n3 n4

Table 9 Bilateral diagram for X X


“No X are Y ” R(A) = Y
not empty. So, I is different from 1. In addition to these, if Y 0
any cell is blank, it has two possibilities, 0 or I.
To obtain the conclusion of a syllogism, the knowledge
of two premises is carried out on a trilateral diagram. This
Let X and Y be two terms and their complements are
presentation is more useful for the elimination method than
denoted by X  and Y  , respectively. Assume that pi shows
the Venn diagram view. In this way, one can observe the
a possible form of any bilateral diagram, such that 1 ≤ i ≤
conclusion of the premises truer and quicker from a trilateral
k, where k is the number of possible forms of the bilateral
diagram. By dint of this method, we demean the data from a
diagram, as in Table 8.
trilateral diagram to a bilateral diagram, involving only two
Where n 1 , n 2 , n 3 , n 4 ∈ {0, 1}. During this paper, R(A) ,
terms that should occur in the conclusion and consequently
R(E) , R(I ) and R(O) correspond “All”, “N o”, “Some” and
eliminating the middle term.
“Some-not” statements, respectively.
This method can be used in accordance with the rules
below (Carroll 1985): Example 1 We analyze the “No X are Y ” statement means
First rule 0 and I are fixed upon trilateral diagrams. that there is no element in the intersection cell of X and Y .
Second rule If the quarter of the trilateral diagram contains We show it in the following bilateral diagram as in Table
an “I” in either cell, then it is certainly occupied, and one 9. From Table 9, we obtain all possible bilateral diagrams
may mark the corresponding quarter of the bilateral diagram which have 0 in the intersection cell of X and Y . So, Table
with a “1” to indicate that it is occupied. 10 shows all possible forms of “No X are Y ”.
Third rule If the quarter of the trilateral diagram contains two
“0”s, one in each cell, then it is certainly empty, and one may Now in order to define a relation between bilateral diagrams
mark the corresponding quarter of the bilateral diagram with and sets, let us form a set consisting of numbers that corre-
a “0” to indicate that it is empty. spond to possible forms that each bilateral diagram possesses.
We obtain the required conclusion of a syllogism by using For this aim, we firstly define a value mapping in which each
of these rules. The effect of Carroll’s method of transfer, possible bilateral diagram corresponds to exactly one value.
unknown to Venn, could not be underestimated. It only shows
how to extract the conclusion from the premises of a syllo- Definition 1 (Kulinkovich 1979) Let pi be a possible bilat-
gism (Moktefi 2015). eral diagram and n i be the value that the ith cell possesses.
The r val
j corresponds to the value of pi which is calculated
by using the formula
3.2 Set-theoretical representation of bilateral
diagrams 
4

j =
r val 2(4−i) n i , 1 ≤ j ≤ k,
We give the set-theoretical representation of syllogistic argu- i=1
ments by means of bilateral diagrams. To build such a model,
where k is the number of all possible forms.
we draw from Carroll’s diagrammatic method. We give a def-
inition of a map which corresponds each bilateral diagram
to a set. Eventually, our main purpose is to construct a com- Definition 2 Let R set be the set of the values which cor-
plete bridge between sets and categorical syllogisms such as respond to all possible forms of any bilateral diagram;
Table 7. that is R set = {r val
j : 1 ≤ j ≤ k, k is the number

123
A new algorithmic decision for categorical syllogisms via Carroll’s diagrams

Table 10 All possible forms of


“All X are Y ”

Table 11 X intersection with Y  X X Table 12 X intersection with Y X X


is the empty set R(A) = Y 0 is the empty set R(E) = Y
Y Y 0

of all possible forms}. The set of all these R set ’s is denoted Table 13 X intersection Y has X X
by RSet .
at least one element R(I) = Y
Y 1
Corollary 1 We obtain the set representations of all categor-
ical propositions as follows:
Table 14 X intersection Y  has X X
– All X are Y It means that X intersection with Y  cell is the at least one element R(O) = Y 1
empty set. We can illustrate this statement as Table 11. Y
From Table 11, we obtain all possible forms as the same
method in Example 1. By the help of Definition 1, the
set representation of “All X are Y” corresponds to the Table 15 The possible forms of bilateral diagrams
set = {0, 1, 2, 3, 8, 9, 10, 11}.
R(A)
P P S S
– No X are Y There is no element in the intersection cell of
pi = M 1 0 and pj = M 0 1
X and Y as Table 12. M 0 0 M 0 0
By Example 1, we have all possible forms of “No X are
Y”. Then, we obtain R(E) set = {0, 2, 4, 6, 8, 10, 12, 14}.

– Some X are Y There is at least one element in the inter-


section X and Y as Table 13. Table 16 The relation of two
possible forms
By using the possible bilateral diagrams of R(I ) , we have
set = {1, 3, 5, 7, 9, 11, 13, 15}.
R(I )

– Some X are not Y If some elements of X are not Y , then


they have to be in Y  . So, the intersection cell of X and
Y  is not empty as Table 14.
From the bilateral diagram of R(O) , we get R(O) set =

{4, 5, 6, 7, 12, 13, 14, 15}. Table 17 The relation between P P


S and P pk = S 0 0
S 1 0
Let consider the relationship between the possible bilateral
diagrams of the categorical syllogisms before discussing the
categorical syllogisms via Carroll’s diagrams.

Example 2 Let pi and p j be two possible forms of the bilat- we obtain that rk = 2 corresponds to pk that is a possible
eral diagrams of major and minor premises, respectively. We conclusion.
take the possible forms of bilateral diagrams as Table 15.
We input the data on the trilateral diagram as in Table 16. Let rival and r val
j be the numbers corresponding to possible
By using the elimination method, we obtain the relation forms of bilateral diagrams that have a common term. Then
between S and P as Table 17. ri = 8 corresponds to possible we can get the relation between two other terms by using this
form pi , and r j = 4 corresponds to possible form p j , then method.

123
N. Kircali Gursoy et al.

Table 18 Operation table of


∗ 0 1 2 3 4 8 12 5 10 6 9 7 11 13 14 15
possible conclusions
0 0
1 1 4 5
2 2 8 10
3 3 12 H
4 1 4 5
8 2 8 10
12 3 12 H
5 1 4 5 5 5 5 5 5 5
10 2 8 10 10 10 10 10 10 10
6 3 12 9 6 11 14 7 13 15
9 3 12 6 9 7 13 11 14 15
7 3 12 13 7 H4 H3 7 13 H1
11 3 12 14 11 H3 H4 11 14 H2
13 3 12 7 13 7 13 H4 H3 H1
14 3 12 11 14 11 14 H3 H4 H2
15 3 12 15 15 H1 H2 H1 H2 H

3.3 Constructing operation of possible conclusion Table 19 The conclusion of the major and the minor premises
table P P S S P P
M  M = S
M M S
After these above examples, we generalize all possible con-
clusions by using only a formula.

Definition 3 The syllogistic possible conclusion mapping,


denoted ∗, is a mapping that gives us the deduction set of 3.4 Determining validity of a syllogism in SLCD
possible forms of major and minor premises sets.
In the last part of this section, we give some definitions and
Theorem 1 Let rival and r val
j correspond to the numbers of
theorems to determine a syllogism is valid or invalid in the
possible forms of the major (row value) and the minor (col- calculus system SLCD.
umn value) premises, respectively. Then, rival ∗r val
j equals the
value given by the intersection of row and column numbers
Definition 4 Universes of values sets of major premises,
corresponding to rival and r val
j in Table 18.
Maj , RMin
minor premises and conclusions are denoted by Rset set

In Table 18, considering possible conclusion operation, and Rset


Con , respectively.
some possible forms of premises have more than one possible
conclusions, given as below: Let R(k)set be an element of Rset and R set be an element
Maj (l)
of Rset
Min . The main problem is what the conclusion of these
H = {6, 7, 9, 11, 13, 14, 15}, H1 = {7, 11, 15}, premises is. In syllogistic, we have some patterns which are
H1 = {6, 7, 9, 11, 13, 15}, mentioned in Tables 3 and 4 above. Now, we explain them
H2 = {13, 14, 15}, H2 = {11, 14, 15}, by using bilateral diagrams with an algebraic approach.

H3 = {6, 7, 11, 14, 15},


H3 = {6, 7, 13, 14, 15}, H4 = {7, 9, 11, 13, 15}, Definition 5 The syllogistic mapping, denoted by , is a
mapping that gives us the conclusion of the major and the
H4 = {9, 11, 13, 14, 15}
minor premises as Table 19.

Therefore, we scrutinize all possible cases between two terms


Theorem 2 Let R(k) set = {r val , . . . , r set } and R set = {r val , . . . ,
and their conclusions. k1 kn (l) l1
Note that, Table 18 is used as the Syllogistic_Mapping() rlval
t
} two sets corresponding to the major and the minor
subalgorithm in Sect. 4. premises. Then  : Rset Maj × R set → Rset
Min Con

123
A new algorithmic decision for categorical syllogisms via Carroll’s diagrams


n 
t
Framework of the whole algorithmic structure is as fol-
set
R(k)  R(l)
set
:= rkval
j
∗ rlval
i lows:
j=1 i=1

set and R set . Step 1 Conditional selection from the conditions set
is the conclusion of the premises R(k) (l) {U nconditional, S_exists, M_exists, P_exists}.
Theorem 3 (Senturk and Oner 2019) A syllogism is valid if Step 2 Figure selection from the figures set {Figur eI ,
and only if it is provable in SLCD. Figur eI I , Figur eI I I , Figur eI V }.
Step 3 Selection of the Major proposition from propositions
Remark 1 For conditional valid forms, we need an addition set {A, E, I , O}.
rule which is “Some X are X ”. We can use the above theorem Step 4 Selection of the Minor proposition from propositions
by taking into consideration this rule. set {A, E, I , O}.
Step 5 Determination of the valid syllogisms.
Remark 2 Let SLCD be noted calculus system. If the rule
“Some X are X when X exists” (i.e.,  I X X ) is added to In the above framework, firstly, a condition is selected
SLCD, then the calculus system SLCD is denoted by SLCD† . from four conditional cases (U nconditional, S_exists,
Definition 6 (Senturk and Oner 2019) Let R(k) be the bilat- M_exists, P_exists) in Step 1. In step 2, a figure is deter-
eral diagram presentation of the premise. The transposition mined from four figures (Figur eI , Figur eI I , Figur eI I I ,
of a premise is the symmetric positions with respect to the Figur eI V ). Then, by examining all proposition states (A,
main diagonal. It is shown by Trans(R(k) ). E, I , O) of major and minor premises, conclusion sets are
created with using operation table of possible conclusions
Trans : Rset → Rset , (Table 18). Lastly, the four conclusion sets of syllogism (from
the relation between S and P) are compared with the conclu-
set
R(k) → T rans(R(k)
set
) = {rkval
T , . . . , r k T }.
set
1 n sion set obtained from the premises and valid syllogisms are
determined.
Theorem 4 (Senturk and Oner 2019) Let R(k) set = {r val , . . . ,
k1 Global variables used to all algorithms are below:
rkset
n
} and R set = {r val , . . . , r val } be two sets to correspond
(l) l1 lt Conc[ ][ ]: two dimensional array, set of all possible bilateral
to the Major and the Minor premises values sets and R(s) set = diagrams
{rs1 , . . . , rsm } be set to correspond to the constant set values
val set Const_set: constant set for each condition S exists, M exists
which means “Some S are S”, “Some M are M” and “Some and P exists
P are P”. Then † : Rset Maj × RMin → RCon
set set
4.1 The syllogism algorithm
 R(l)
set † set
R(k)
⎧ n t m This is the main algorithm. In this algorithm (Algorithm 1),
⎪    val

⎪ (rk j ∗ (rsvar ∗ rlvar
T )), If S exists AT P() and Decision() subalgorithms are run for each state

⎪ h

⎪ j=1 i=1 h=1 i (Unconditional, S exists, M exists and P exists) and for each
⎨ n  t  m figure (FigureI, FigureII, FigureIII and FigureIV ) as defined
:= (rkval ∗ (rlvar ∗ rsvar )), If M exists


j i h in Table 2. This algorithm sends the related figure as a param-

⎪
j=1 i=1 h=1
n  t 


m eter to the AT P() subalgorithm and also, it sends the related

⎩ ((rsvar ∗ rkval
T ) ∗ rli ),
var If P exists
j=1 i=1 h=1
h
j state and figure as parameters to the Decision() subalgo-
rithm.
is the conclusion of the premises R(k)set and R set under the
(l)
conditions S exists, M exists or P exists. 4.2 The adjusting of terms positions (ATP)
subalgorithm
Theorem 5 (Senturk and Oner 2019) A strengthened syllo-
gism is valid if and only if it is provable in SLCD† . This subalgorithm (Algorithm 2) determines the positions of
the subject term, middle term and predicate term for major
and minor premises with respect to the figure parameter in
4 An algorithmic decision for categorical input as Table 2.
syllogisms in SLCD
4.3 The decision subalgorithm
In this part of this work, we give an algorithm to decide
whether a categorical syllogism is valid or not in the calculus This subalgorithm (Algorithm 3) determines major and
system SLCD or SLCD† for the first time in the literature. minor sets for each proposition (A, E, I and O) of major and

123
N. Kircali Gursoy et al.

Algorithm 1: Syllogism Algorithm 3: Decision


Data: All states for each Figure Data: The set interpretations of major and minor premises of
Result: Obtain the Conclusion set of syllogisms and make a syllogisms.
decision for syllogisms whether “Valid” or “Invalid”. Result: Obtain the Conclusion set of syllogisms and make a
1 Syllogism() decision for syllogisms whether “Valid” or “Invalid”.
2 foreach cond in 1 Decision(cond,fig)
Conditions{U nconditional, S_exists, M_exists, P_exists} 2 foreach m j_ pr op in Pr opositions{A, E, I , O} do
do 3 ma jor _set =
3 foreach f ig in Set_I nter pr etation(m j_ pr op, “ma jor  , cond)
Figur es{Figur eI , Figur eI I , Figur eI I I , Figur eI V } 4 foreach mn_ pr op in Pr opositions{A, E, I , O} do
do 5 minor _set =
4 AT P( f ig) Set_I nter pr etation(mn_ pr op, “minor  , cond)
5 Decision(cond, f ig) 6 pr emises_conclusion =
Syllogistic_Mapping(ma jor _set, minor _set)
7 foreach conc_ pr op in Pr opositions{A, E, I , O} do
8 if pr emises_conclusion =
Algorithm 2: ATP Conc[cond][conc_ pr op] then
9 Print m j_ pr op & mn_ pr op & conc_ pr op & “−
Data: The specified figure
V alid 
Result: Positions of the major and minor terms are determined
1 ATP(fig)
2 if f ig = “Figur eI  then
3 m j1 = “M  ; m j2 = “P 
4 mn 1 = “S  ; mn 2 = “M  Syllogistic_Mapping() which gets inputs as the temp
5 else if f ig = “Figur eI I  then
set and the constant set, respectively.
6 m j1 = “P  ; m j2 = “M 
7 mn 1 = “S  ; mn 2 = “M 
8 else if f ig = “Figur eI I I  then – If the state is “P exists” and the premise type is “major”,
9 m j1 = “M  ; m j2 = “P  then new temp set is determined by taking the transpose
10 mn 1 = “M  ; mn 2 = “S  of temp set and it returns the result of the subalgorithm
11 else if f ig = “Figur eI V  then
12 m j1 = “P  ; m j2 = “M 
Syllogistic_Mapping() which gets inputs as the con-
13 mn 1 = “M  ; mn 2 = “S  stant set and the new temp set, respectively.

– If the state is “Unconditional”, then it just returns the


temp set.
minor premises by using Set_I nter pr etation() subalgo-
rithm in Sect. 4.4. We obtain a conclusion from premises via
Syllogistic_Mapping() using major set and minor set val-
ues concerning Table 18. Later, the conclusion set obtained
Algorithm 4: Set Interpretation
from the premises is compared to all conclusion sets under
Data: The specified premise proposition, premise type and state
the corresponding state. If these are equal to each other, then Result: The conclusion set
the subalgorithm prints “valid” output for the related syllo-
1 Set_I nter pr etation( pr emise_ pr op, pr emise_t ype, cond)
gism. 2 Determine T emp_set using premise_type and premise_prop
for Unconditional state with respect to the Diagram
4.4 The set interpretation subalgorithm 3 if pr emise_t ype = “minor  then
4 if cond = “S E xists  then
5 N T emp_set =
In this subalgorithm (Algorithm 4), firstly, the temp set is transpose the diagram o f T emp_set
determined for the premise type and the premise proposition 6 return Syllogistic_Mapping(Const_set, N T emp_set)
as the unconditional state. 7 if cond = “M E xists  then
8 return Syllogistic_Mapping(T emp_set, Const_set)

– If the state is “S exists” and the premise type is “minor”, 9 if pr emise_t ype = “ma jor  then
then new temp set is determined by taking the transpose 10 if cond = “P E xists  then
11 N T emp_set =
of temp set and it returns the result of the subalgorithm
transpose the diagram o f T emp_set
Syllogistic_Mapping() which gets inputs as the con- 12 return Syllogistic_Mapping(Const_set, N T emp_set)
stant set and the new temp set, respectively.
13 r etur n T emp_set
– If the state is “M exists” and the premise type is
“minor”, then it returns the result of the subalgorithm

123
A new algorithmic decision for categorical syllogisms via Carroll’s diagrams

4.5 An example of the algorithm in SLCD Using above notation, the time complexity of the main
algorithm is T (m, n, k) = 2mnk 3 + 6mnk 2 + 5mnk + 8mn.
In this example, we choose “All M are P” and “All S are Furthermore, if taking m = n = k, the syllogism algorithm
M” for major and minor premises, respectively under the asymptotically has O(n 5 ) running time. Hence, the presented
unconditional statement. algorithm runs in polynomial time.
Initially, the algorithm determines major and minor
premises sets.
All M are P All S are M 5 Conclusion
0-0-0-0 0-0-0-0
1-0-0-0 1-0-0-0 In this paper, we present a new effective algorithm for the
0-1-0-0 0-0-1-0 categorical syllogisms by using a calculus system SLCD for
1-1-0-0 1-0-1-0 the first time in literature. In accordance with this purpose,
0-0-0-1 0-0-0-1 we explain categorical syllogisms by the help of Carroll’s
1-0-0-1 1-0-0-1 diagrams and we find unconditionally valid syllogisms and
0-1-0-1 0-0-1-1 conditionally valid syllogisms via this algorithmic approach.
1-1-0-1 1-0-1-1 As a result, our aim in this paper is to design a polynomial-
Major Premise Set: Minor Premise Set: time algorithm to contribute to researchers getting into the
{0, 8, 4, 12, 1, 9, 5, 13} {0, 8, 2, 10, 1, 9, 3, 11} act in different areas of science used categorical syllogisms
such as artificial intelligence, engineering, computer science
Then, the algorithm obtains possible conclusions from
and also mathematics.
major and minor premises sets by using the ∗-operation in
Table 18 and refines the repetitive values in conclusion set. Acknowledgements The authors would like to thank all the reviewers
Note that, some operation conclusions are not listed because for their constructive comments. This study is supported by Ege Univer-
they don’t have any possible conclusion. sity Scientific Research Projects Directorate with the Project Number
21267.
0∗0=0 8∗8=8 4∗8=4 12 ∗ 8 = 12
1∗2=4 1∗1=1 1∗3=5 9 ∗ 10 = 12 Compliance with ethical standards
9∗9=9 9 ∗ 11 = 13 5 ∗ 10 = 4 5∗9=5
5 ∗ 11 = 5 13 ∗ 10 = 12 13 ∗ 9 = 13 13 ∗ 11 = 13 Conflict of interest The authors declare that they have no conflict of
interests.
Conclusion set: {0, 8, 4, 12, 4, 1, 5, 12, 9, 13, 4, 5, 5, 12, Human and animal participants This article does not contain any stud-
13, 13}. ies with human participants performed by any of the authors.
After omitting the duplicated elements:
Conclusion set: {0, 1, 4, 5, 8, 9, 12, 13}.
Finally, we compare with the four conclusion sets of syllo- References
gism (from the relation between S and P) and the conclusion
set obtained from the premises. It is determined that AAA is Abeles FF (2005) Lewis Carroll’s formal logic. Hist Philos Logic
valid. 26(1):33–46
Abeles FF (2007) Lewis Carroll’s visual logic. Hist Philos Logic
28(1):1–17
(1) AAA-VALID Barnes J (2014) The complete works of Aristotle: the revised Oxford
(2) AAE- translation. Princeton University Press, Princeton
(3) AAI- Carroll L (1958) Symbolic logic and the game of logic. Courier Corpo-
(4) AAO- ration, North Chelmsford
Castro-Manzano JM (2015) Słupecki’s rule for diagrammatic reason-
ing. Studia Metodologiczne 35:79–96
4.6 The complexity of the main algorithm Castro-Manzano JM (2017) Re(dis)covering Leibniz’s diagrammatic
logic. Tópicos, Revista de Filosofía 52:89–116
Deng W, Zhao H, Zou L, Li G, Yang X, Wu D (2017) A novel collab-
In this section, we briefly give a complexity analysis of the
orative optimization algorithm in solving complex optimization
main algorithm. The entries used in the main algorithm and problems. Soft Comput 21(15):4387–4398
the subalgorithms as below: Glasgow J, Narayanan NH, Chandrasekeran B (1995) Diagrammatic
reasoning: cognitive and computational perspectives. AAAI Press,
Palo Alto
m: the number of conditions,
Kulinkovich AE (1979) Algorithmization of reasoning in solving
n: the number of figures, geological problems. In: Proceedings of the methodology of geo-
k: the number of propositions. graphical sciences, pp 145–161

123
N. Kircali Gursoy et al.

Kumova BI, Cakir H (2010) Algorithmic decision of syllogisms. In: Rocha J, Meseguer J (2007) A rewriting decision procedure for
International conference on industrial, engineering and other appli- Dijkstra–Scholten’s syllogistic logic with complements. Revista
cations of applied intelligent systems. Springer, Heidelberg Colombiana de Comp 8(2):101–130
Łukasiewicz J (1957) Aristotle’s syllogistic from the standpoint of mod- Senturk I, Oner T (2019) An algebraic analysis of categorical syllogisms
ern formal logic, 2nd edn. Oxford University Press, Oxford by using Carroll’s diagrams. Filomat 33(2):367–383
Mayer RE (1992) Thinking, problem solving, and cognition. WH Free- Senturk I, Oner T, Nuriyev U (2016) Completeness of categorical syl-
man, New York logisms by means of diagrammatic method. In: Association for
Mayer RE (2009) Multimedia learning, 2nd edn. Cambridge University symbolic logic European summer meeting, logic colloquium 2016,
Press, New York Leeds, England
Moktefi A (2008) Lewis Carroll’s logic. In: Gabbay DM, Woods J (eds) Skliar O, Monge RE, Gapper S (2015) Using inclusion diagrams as an
The handbook of the history of logic, vol. 4: British logic in the alternative to Venn diagrams to determine the validity of categor-
nineteenth-century. Elsevier, Amsterdam, pp 457–505 ical syllogisms. arXiv:1509.00926
Moktefi A (2015) A history of logic diagrams, visual reasoning with Turunen E (2014) An algebraic study of Peterson’s intermediate syllo-
diagrams. Springer, Berlin, pp 55–71 gisms. Soft Comput 18(12):2431–2444
Moktefi A (2018) Carroll diagrams: design and manipulation. In: Chap- Zadeh LA (1985) Syllogistic reasoning as a basis for combination of
man P, Stapleton G, Moktefi A, Perez-Kriz S, Bellucci F (eds) evidence in expert systems. In: 9th international joint conference
Diagrammatic representation and inference. Diagrams, lecture on artificial intelligencem pp 417–419
notes in computer science, vol 10871. Springer, Cham, pp 32–35 Zhao H, Zheng J, Xu J, Deng W (2019a) Fault diagnosis method based
Moktefi A, Shin SJ (2012) A history of logic diagrams, handbook of the on principal component analysis and broad learning system. IEEE
history of logic, vol 11. North-Holland, Amsterdam, pp 611–682 Access 7:99263–99272
Moktefi A (2017) Diagrams as scientific instruments. In: Benedek A, Zhao H, Liu H, Xu J, Deng W (2019b) Performance prediction using
Veszelszki A (eds) Visual, virtual, veridical. Visual learning, vol high-order differential mathematical morphology gradient spec-
7. Peter Lang Verlag, Frankfurt/M., pp 81–89 trum entropy and extreme learning machine. IEEE Trans Instrum
Nakatsu RT (2014) Using Venn diagrams to perform logic reasoning: an Meas. https://doi.org/10.1109/TIM.2019.2948414
algorithm for automating the syllogistic reasoning of categorical
statements. Int J Intell Syst 29(1):84–103
Niittymäki J, Turunen E (2003) Traffic signal control on similarity logic Publisher’s Note Springer Nature remains neutral with regard to juris-
reasoning. Fuzzy Sets Syst 133:109–131 dictional claims in published maps and institutional affiliations.
Pratt-Hartmann I, Moss LS (2009) On the computational complexity of
the numerically definite syllogistic and related logics. Rev Symb
Logic 2:647–683

123

You might also like