This is a very interesting problem in Inductive theory.
All horses in the same color
p
f
:
b
y
i
n
d
u
c
t
i
o
n
p
(
n
)
:
I
n
a
n
y
s
e
t
o
f
n
h
o
r
s
e
s
,
t
h
e
h
o
r
s
e
s
a
r
e
a
l
l
i
n
s
a
m
e
c
o
l
o
r
B
a
s
e
c
a
s
e
:
p
(
1
)
t
r
u
e
I
n
d
u
c
t
i
v
e
s
t
e
p
:
A
s
s
u
m
e
p
(
n
)
t
o
p
r
o
v
e
p
(
n
+
1
)
c
o
n
s
i
d
e
r
s
e
t
o
f
n
+
1
h
o
r
s
e
s
H
1
,
H
2
,
.
.
.
,
H
n
+
1
T
h
e
n
H
1
,
H
2
,
.
.
.
,
H
n
a
r
e
t
h
e
s
a
m
e
c
o
l
o
r
T
h
e
n
H
2
,
H
3
,
.
.
.
,
H
n
+
1
t
h
e
s
a
m
e
c
o
l
o
r
C
o
l
o
r
(
H
1
)
=
C
o
l
o
r
(
H
2
,
H
3
,
.
.
.
,
H
n
)
=
C
o
l
o
r
(
H
n
+
1
)
P
R
O
V
E
D
pf: by\ induction\\p(n):In\ any\ set \ of \ n \ horses \ ,\ the \ horses\ are \ all\ in\ same\ color\\Base\ case:\ p(1)\ true\\Inductive\ step:Assume\ p(n)\ to\ prove\ p(n+1)\ \\consider \ set \ of \ n+1\ horses\ H_1,H_2,...,H_{n+1}\\Then\ H_1,H_2,...,H_n\ are \ the\ same\ color\\Then H_2,H_3,...,H_{n+1}\ the\ same\ color\\Color(H_1)=Color(H_2,H_3,...,H_n)=Color(H_{n+1})\\PROVED
pf:by inductionp(n):In any set of n horses , the horses are all in same colorBase case: p(1) trueInductive step:Assume p(n) to prove p(n+1) consider set of n+1 horses H1,H2,...,Hn+1Then H1,H2,...,Hn are the same colorThenH2,H3,...,Hn+1 the same colorColor(H1)=Color(H2,H3,...,Hn)=Color(Hn+1)PROVED
what’s the problem of this provement?
因为在Base case中我们只考察了n=1时的情况
那么
p
(
1
)
=
>
p
(
2
)
c
o
r
r
e
c
t
?
p(1)=>p(2)\ \ \ \ \ correct?
p(1)=>p(2) correct?
根据我们得到的结论
C
o
l
o
r
(
H
1
)
=
C
o
l
o
r
(
H
2
,
H
3
,
.
.
.
,
H
n
)
=
C
o
l
o
r
(
H
n
+
1
)
B
u
t
i
f
n
=
1
:
H
2
,
H
3
,
.
.
.
,
H
n
i
s
e
m
p
t
y
.
所
以
结
论
不
成
立
Color(H_1)=Color(H_2,H_3,...,H_n)=Color(H_{n+1})\\But \ if \ n=1:\ H_2,H_3,...,H_n\ is \ empty.\\所以结论不成立
Color(H1)=Color(H2,H3,...,Hn)=Color(Hn+1)But if n=1: H2,H3,...,Hn is empty.所以结论不成立