RE:ๆพๅฐๆง็ฉ่ณชใๅซใๅฝ้ ้่ฒจใฎ็นๅฎ๏ผๆ่ก่ ใจใฌใคใฌใผใซใฆใณใฟใผใซใใๆธฌๅฎๆฆ็ฅ
ใใใฎในใฌใใใซใฏใใไปฅไธ่ฟไฟกใงใใพใใใใใจใชใใพใใฆใใใใใใชใๆฐ่ฆในใฌใใใงใใ
No.2173 DD++ใใ 9ๆ16ๆฅ 16:55 ใฎใๆ็จฟใซใคใใฆ่ฟไฟกใงใใ
้ฝๆงๅ ฑๅใฎๆฐใ 6 ใจ 2 ใจใงใฏใชใใจใใชใใพใใใ4 ใงใฏๆด็ใใคใใใซ้ทใๅๆใซใชใฃใฆใใพใใพใใ้ฐๆง 3 ใจ่ชญใฟๆฟใใฆใใใพใใใใใ
ในใซใใจใใ่จผๆใใๆ็คบ้กใใใฐๅนธใใงใใ
===
็ๆงใธใ
ๆฉๆขฐใซๅ
จๆฐๆคๆปใใใฆใใใใพใใใจใใใใใ ใใฎไบๆณใฏ็ใฎใใใงใใ
ไธ่จใง true ใๅบๅใใฆใใพใใใ(JavaScriptใซใใใใญใฐใฉใ ใงใใ)
jslint็ใซใฏ่ถ
ใคใใใงใใ็ณใ่จณใใใพใใใ
function hammingDistance(str1, str2) {
// ใใใณใฐ่ท้ขใ่จ็ฎใใ้ขๆฐ
let distance = 0;
for (let i = 0; i < str1.length; i++) {
if (str1[i] !== str2[i]) {
distance++;
}
}
return distance;
}
function checkCondition(sequences) {
// ๆกไปถใๆบใใใใใงใใฏใใ้ขๆฐ
for (let i = 0; i < sequences.length; i++) {
const originalSeq = sequences[i];
// 2ใใใใๅ่ปขใใใใในใฆใฎ็ตใฟๅใใ
for (let j = 0; j < originalSeq.length; j++) {
for (let k = j + 1; k < originalSeq.length; k++) {
const newSeq = originalSeq.split('');
newSeq[j] = newSeq[j] === '0' ? '1' : '0';
newSeq[k] = newSeq[k] === '0' ? '1' : '0';
const z = newSeq.join('');
let count = 0;
for (const seq of sequences) {
if (hammingDistance(z, seq) === 2) {
count++;
}
}
// ใใใณใฐ่ท้ขใ2ใงใใใทใผใฑใณในใๅธธใซ3ใคใงใชใใใฐfalseใ่ฟใ
if (count !== 3) {
return false;
}
}
}
}
return true;
}
// ไธใใใใใทใผใฑใณใน
const sequences = ['0000000', '0010111', '1001011', '1100101', '1110010', '0111001', '1011100', '0101110'];
const result = checkCondition(sequences);
console.log(result); // true or falseใๅบๅใใใ
=====
ใจใใใงใใใฎไฝๆฆใใใพใใใใฎใงใใใชใใฐใ
๏ผๅใฎๅใคใๆ่ก่
ใๅธธใซๅใฎๅ ฑๅใใใฆใใใฎใงใใใชใใฐใ
๏ผๆไธญใฎ๏ผๆใงใฏใชใ
๏ผๆไธญใฎ๏ผๆใฎๅฝ้่ฒจใ็นๅฎใงใใใฎใงใใญ๏ผ
0็ชใใ7็ชใฎ้่ฒจใซใคใใฆใฎๅฆ็ใฎใคใใใงไปใพใงใฏใ่ฉฑใใใฆใใพใใใใ
ใ0็ชใซใฏ2ๆใๅฒใๅฝใฆใใใใจใจใใพใใ
ๅพๅใฎโ ใใโขใฎใฑใผในใงโ ใซใฏๅคๆดใชใใ
โกใงใฏใๅคๆดใใใใใใฏๅใคใใชใใฎใฑใผในใงใใใ๏ผ็ชใณใคใณใใ๏ผ็ชใพใงใฎใฉใใใซใใใใใชใใใฐใ็ฌฌไบๆฎต้ใงใ2ๆใฎ0็ชใฎใใกใฉใกใใๅฝใณใคใณใชใฎใใใ๏ผๅใฎๅใคใใซๅคๅฎใใฆใใใใใจใจใชใใพใใ
โขใงใฏใๅฝๆธฌๅฎๅคใ๏ผๅๅซใ๏ผๅใฎใใผใฟใๅพใใใใจใใซใๅฝ้่ฒจใฎๅ่ฃใฏใใใคใใ๏ผๆใงใใใใงใฏใชใใ0็ชใๅ่ฃใซใชใใจใใซใฏ4ๆใๅฝ้่ฒจใฎๅ่ฃใจใชใใพใใ
็ฌฌไบๆฎต้ใงใฏใๆญฃ็ด่
ใฎๆ่ก่
ใ2ๅๆฎใฃใฆใใพใใฎใงๅฝ้่ฒจใฎ็นๅฎใฏๅฏ่ฝใงใใ
ใใใผใ๏ผใ
ๆณจ็ฎใในใใฏใ้ฐๆงๅ ฑๅใใใฆใใ 3 ไบบใใใๆธฌๅฎใซใใใชใใฃใใๆนใฎใณใคใณใงใใญใ
ใใจใฏใใซใผใฏใใณใฎ็ตๅใๅ้กใฏ๏ผๅคๅใใกใๅนณ้ขใง่ใใๅ ดๅใงใ๏ผ๏ผใไปปๆใฎ 2 ใคใฎ็ตใฎ้ใซๅฟ
ใๅ
ฑ้ไบบ็ฉใ 1 ไบบใ ใๅญๅจใใใใจใๆณจ็ฎใซๅคใใพใใ
DD++ ใใใ
ใใณใใณใฎใใณใใๆ้ฃใใใใใพใใ
ใใใใใพใง
ๅฝใณใคใณๅ่ฃใใ๏ผๅไปฅไธใใงใใใจใฏ็คบใใพใใใ
ใใใใชใใไธๅบฆ๏ผๅใใใจใใใจใใใพใงใฏใพใ ใใใคใใฆใใใพใใใ
ใชใซใๅ็ดใชใใจใ่ฆ่ฝใจใใฆใใใซใกใใใใใพใใใ
ใใๅฐใใ ใ่ใใฆใฟใพใใ
้ฝๆงๅ ฑๅๆฐ 4 ใ ใใฉ็็พใๅซใพใใฆใใๅ ดๅใฎ่ฉฑใงใใใญ๏ผ
้ฐๆงๅ ฑๅใใใ 3 ไบบใ A, B, C ใจใใพใใ
A ใๅใคใใ ใจไปฎๅฎใใใจใA ใๆธฌๅฎใซใใใฆใใฆใB ใจ C ใๆธฌๅฎใซใใใฆใใชใใณใคใณใฏๆฌ็ฉๅ่ฃใซใชใใพใใ
ใใฆใใใฎใใใชใณใคใณใฏไฝๆๅญๅจใใใงใใใใ๏ผ
DD++ ใใใ
ใใฃใใใ้ใใงใใญ๏ผ๏ผ๏ผ
ๆๅคงใฎใใณใใใพใใจใซใใใใจใใใใใพใ๏ผ๏ผ๏ผ
็ๆงใธใ
ใใจใงใใใใใจ่จผๆใฎใขใฆใใฉใคใณใๆธใใฆใใๆๅญใงใใ
ใใฃใใ DD++ ใใใซใใณใใใใใ ใใฆใใใพใใฎใซใใไธๅบฆ๏ผๅใงใใใใปใใฎ่จผๆใใพใ ๆธใไธใใฆใใใพใใใใใณใ็ตตใซใคใใฆใฏๆผธใๅบๆฅไธใใใพใใใใใฉใใ็ณใ่จณใชใใใจใงใใ
[2191]ใฎๆ็จฟใง็งใฏใ๏ผๅไปฅไธใใฎ่จผๆใชใๅบๆฅใใจ็ณใใฆใใใพใใใ
ไปๆฅใฏใใกใใฎใปใใฎใกใขๆธใใไธ่จใซๆ็จฟใใใใพใใ
้่ฒจใฎๅๅใ
z, a, b, c, d, e, f, g
ใจใใพใใ
ๆ่ก่
๏ผๅใซใฏๆทปใๅญใจใใฆ 1 ใใ 7 ใไธใใพใใ
ใฌใคใฌใผใซใฆใณใฟใผใซใใ
ๆคๆป็ตๆใ
q ใจใใพใใ
q ใฏใ7ๅใฎๆ่ก่
ใซใใ้ฐๆง(0)ใ้ฝๆง(1) ใฎ็ตๆใ็คบใ
๐โ, ๐โ, ๐โ, ... , ๐โ
ใจใใฆ่กจใใพใใ
ใใพใๅฝ้่ฒจใ a ใงใใ็ถๆณไธใงใ
ๆ่ก่
ใ q ใฎๆคๆป็ตๆใ่ฟใใใจใใพใใ
ใพใใใใชใใฃๆคๆปใซใใใ
q ใฏ a ใซๅฏพใใฆใใใณใฐ่ท้ขใ 2 ใงใใใจๅคๆใใใใฎใจใใพใใ
ไธ่ฌๆงใๅคฑใใชใใใใซใใใใใซใ
q ใใz, a ใใ g ใพใงใซไฝฟใใใๆทปใๅญใงใใใ 1 ใใ 7 ใพใงใซใคใใฆ
{h, k, m, n, p, s, t} = {1, 2, 3, 4, 5, 6, 7}
ใจใใพใใ่่ถณใงใใไธก่พบใฎ้ๅใฎๅ่ฆ็ด ใฏไธๅฏพไธๅฏพๅฟใใพใใใใฉใ้ ไธๅใงใใ
ไปฅไธใฎ่จ่ฟฐใงไธ่ฌๆงใๅคฑใใชใใใใฎ็ดๆใฆใใ
ใพใใ๐โ ใฎใใใๅ่ปขใใใใฎใ ๐ฬ
โ ใชใฉใจใใชใผใใผใฉใคใณใง่กจใใใจใจใใพใใ
ๅฝ้่ฒจ ๐ ใซใใใใ ๆคๆป็ตๆใ ๐ ใจใใฆไธใใใใใใฎใจใใพใใ2 ใใใใฎๅ่ปขใฏใใใใไฝ็ฝฎ h, k ใง็บ็ใใฆใใใใจใจใใพใใ
ๅณ็คบใใใฐใๆฌกใฎ๏ผ่กใฎๅใใใใฎไธใจไธใจใฏ็็ๅคใฏ็ญใใใงใใ
๐ฬ
โ, ๐ฬ
โ, ๐โ, ๐โ, ๐โ, ๐โ, ๐โ
๐โ, ๐โ, ๐โ, ๐โ, ๐โ, ๐โ, ๐โ
ใใฎ ๐ ใ ๐ ใใๅฝ้่ฒจใฎๅ่ฃใจใใฆ่ใใใใใใจใใพใใใใๅณ็คบใใพใใจไปฅไธใฎ๏ผใใฟใผใณใฎใฟใซๅใใใพใใ
โใใฟใผใณ๏ผ
๐ฬ
โ, ๐ฬ
โ, ๐โ, ๐โ, ๐โ, ๐โ, ๐โ
๐โ, ๐โ, ๐โ, ๐โ, ๐โ, ๐โ, ๐โ
๐ฬ
โ, ๐ฬ
โ, ๐โ, ๐โ, ๐โ, ๐โ, ๐โ
โใใฟใผใณ๏ผ
๐ฬ
โ, ๐ฬ
โ, ๐โ, ๐โ, ๐โ, ๐โ, ๐โ
๐โ, ๐โ, ๐โ, ๐โ, ๐โ, ๐โ, ๐โ
๐โ, ๐ฬ
โ, ๐ฬ
โ, ๐โ, ๐โ, ๐โ, ๐โ
โใใฟใผใณ๏ผ
๐ฬ
โ, ๐ฬ
โ, ๐โ, ๐โ, ๐โ, ๐โ, ๐โ
๐โ, ๐โ, ๐โ, ๐โ, ๐โ, ๐โ, ๐โ
๐โ, ๐โ, ๐ฬ
โ, ๐ฬ
โ, ๐โ, ๐โ, ๐โ
ๅๆใใพใใ
ใใฟใผใณ๏ผใงใฏใ
a ใจ b ใจใฏใใใใณใฐ่ท้ขใ 0 ใจใชใฃใฆใใพใใๆฌๆฅใใในใใใใณใฐ่ท้ขใ๏ผใงใใใใจใจ็็พใใพใใใใฟใผใณ๏ผใฏใใใใพใใใ
ใใฟใผใณ๏ผใงใฏ
a ใจ b ใจใฏใใใใณใฐ่ท้ขใ 2 ใจใชใฃใฆใใพใใๆฌๆฅใใในใใใใณใฐ่ท้ขใ๏ผใงใใใใจใจ็็พใใพใใใใฟใผใณ๏ผใฏใใใใพใใใ
ใใฟใผใณ๏ผใงใฏ
a ใจ b ใจใฏใใใใณใฐ่ท้ขใ 4 ใจใชใใๆฌๆฅใใในใใใใณใฐ่ท้ขใ๏ผใงใใใใจใจ็็พใใพใใใใใฟใผใณ๏ผใฏใใใใพใใ
ใใใใใใใใฟใผใณ๏ผใฎใฟใใa ใจ b ใจใฎ้ใฎ้ขไฟใ็คบใใฆใใพใใใใฟใผใณ๏ผใๅๆฒใใพใใ
๐ฬ
โ, ๐ฬ
โ, ๐โ, ๐โ, ๐โ, ๐โ, ๐โ
๐โ, ๐โ, ๐โ, ๐โ, ๐โ, ๐โ, ๐โ
๐โ, ๐โ, ๐ฬ
โ, ๐ฬ
โ, ๐โ, ๐โ, ๐โ
ใใฆใ็ฌฌไธใฎ้่ฒจ c ใๅฝ้ ้่ฒจใฎๅ่ฃใ ใจใใพใใใใ
ใใใใใใฟใผใณใฏไปฅไธใฎใฟใงใใ
๐ฬ
โ, ๐ฬ
โ, ๐โ, ๐โ, ๐โ, ๐โ, ๐โ
๐โ, ๐โ, ๐โ, ๐โ, ๐โ, ๐โ, ๐โ
๐โ, ๐โ, ๐ฬ
โ, ๐ฬ
โ, ๐โ, ๐โ, ๐โ
๐โ, ๐โ, ๐โ, ๐โ, ๐ฬ
โ, ๐ฬ
โ, ๐โ
a ใจ b ใจใฎ้ขไฟใฏใa ใจ c, b ใจ c ใจใฎ้ขไฟใซใใใฎใพใพ้็จใใใใใงใใ
ๆธฌๅฎ็ตๆใงใใ q ใซใคใใฆใa, b, c ใๅฝ้่ฒจใฎๅ่ฃใงใใๅ ดๅใซใฏใใใใๅ่ปขใฎ้ขไฟใฏไธใซๅฐฝใใใใจใจใชใใพใใ
ใใใงใๆดใซใ้่ฒจ d ใๅฝ้่ฒจใฎๅ่ฃ่ถณใๅพใใใจๅใใ็ซใฆใพใใ
h,k,m,n,p,s ไปฅๅคใฎใตใใคใฎไฝ็ฝฎใงใd ใฏ q ใซใใใใฆใใใๅ่ปขใใฆใใชใใฆใฏใชใใพใใใใใใฏไธๅฏ่ฝใงใใ
ใใใพใงใใพใจใใใฐใ
ๆธฌๅฎ็ตๆ q ใไธใใใใใชใใฐใๅฝ้่ฒจใงใใใใจใใใใใใฎใฏใa,b,c, ใฎ๏ผๆใพใงใงใ4ๆไปฅไธใงใฏใใๅพใชใใใจใใใใใพใใใ
ใชใใ๏ผๆไปฅไธใงใใใใจใ็คบใใใ ใใงใใฃใฆใ๏ผๆไธๅบฆใ็คบใใใใใงใฏใชใใใจใไป่จใใฆใใใพใใ
ใใ๏ผ
็งใฏใใใจ็ญใใใฎใใฎใฎใคใใใงๆธใใฆใใใงใใโฆโฆ
้ฝๆงๅ ฑๅใ 4 ไบบใ ใฃใๅ ดๅใ
ใปๅ
จๅกๆญฃ็ด
ใป้ฝๆงๅ ฑๅใจ้ฐๆงๅ ฑๅใใใใใง 1 ไบบๅใคใ
ใฎใใใใใงใใใญ๏ผ
ๅ่
ใฏใใใณใฐ่ท้ข 0 ใง่ฉฑใฏ็ตใใฃใฆใใพใใ
ๅพ่
ใฎๅ ดๅใ้ฐๆงๅ ฑๅ่
ใฎใใก 2 ไบบใๆธฌๅฎใใๅคใใใณใคใณใๆฌ็ฉๅ่ฃใงใใ
ใใใฆใใใฏไปปๆใฎ้ฐๆงๅ ฑๅ่
2 ไบบ็ตใฎ้ใซๅ
ฑ้ใงๆธฌๅฎใใชใใฃใใณใคใณใ๏ผ่ชฐใๆธฌใใชใใฃใใใคไปฅๅคใง๏ผๅฟ
ใใกใใใฉ 1 ๆใใใๅ่จใง 3C2 = 3 ๆๅญๅจใใพใใ
DD++ ใใใใใณใใณใๆใ็
ฉใใใฆใใพใใพใใฆ็ณใ่จณใใใใพใใใงใใใๆ้ฃใใใใใพใใ
โ ๅ้กใฎๆฏใ่ฟใใใใพใใ
No.2129Dengan kesaktian Indukmu9ๆ8ๆฅ 00:09
ใฎๅ้กใงใฏ 10 ไบบใฎใฑใผในใงใฏ่งฃใใใใงใฏ9ไบบใงใฏ๏ผ ใจใชใฃใใฎใใใจใฎ็บ็ซฏใงใใ
๏ผไบบใฎใใกใ็ฌฌไธๆฎต้ใง๏ผไบบใๆๅ
ฅใใใใงๅฝ้่ฒจใ็นๅฎใงใใใฐใใใใใฎใชใใซ่ๅฝใฎใฌใใผใใใใฆใใๆ่ก่
ใ๏ผไบบใใใฑใผในใใใใใใใใฎๅ ดๅใซใฏๅฝ้่ฒจใ็นๅฎใงใใชใใใฎใฎใๅฝ้่ฒจใฎๅ่ฃใใไธๅบฆใ๏ผๆใซใชใใฎใงใ็ฌฌไบๆฎต้ใจใใฆๆฎใใฎๆญฃ็ดใชๆ่ก่
๏ผๅใๅฝ้่ฒจใ็นๅฎใงใใใ ใใใใใใซๆ่ก่
ใฏ9ไบบใงๅๅใ ใใจใใ็ญๆธใใชใฎใงใใใ
ไปๅใฏ็ฌฌไธๆฎต้ใฎใขใซใดใชใบใ ใๆฑบๅฎใใใชใใใคใไธๅบฆ๏ผไบบใๅ้กใซใคใใฆใๅไบบ็ใช็ต่ซใ็ใใใซใๅ ฑๅใใใใพใใ
///////////
ใๆณจๆ:ใใใพใงใฎๆตใใจ้ฐๆง้ฝๆงใฎๆฑใใ้่ปขใใฆใใพใฃใฆใใพใใ็ณใ่จณใใใพใใใ
(ใฒใจใใซ็งใฎ็ด่ฆณใซใใใใฆใใพใฃใใ ใใชใฎใงใใโฆโฆ)
///////////
โ ็ฌฌไธๆฎต้ใงใฎๆธฌๅฎใซใคใใฆ
i ใ 1 ใใ 7 ใพใงใฎๆทปๅญใจใใฆไฝฟใใพใใ
j ใ 1 ใใ 8 ใพใงใฎๆทปๅญใจใใฆไฝฟใใพใใ
7ไบบใใๆ่ก่
ใซใ1 ใใ 7 ใจๅๅใใคใใพใใๆทปๅญใจใใฆใฏใใฃใฑใ i ใไฝฟใใพใใ
้ฝๆง้ๅ Pj ใไปฅไธใฎใใใซๅฎ็พฉใใพใใ
P1 = {2, 3, 5}
P2 = {3, 4, 6}
P3 = {4, 5, 7}
P4 = {5, 6, 1}
P5 = {6, 7, 2}
P6 = {7, 1, 3}
P7 = {1, 2, 4}
P8 = {1, 2, 3, 4, 5, 6, 7}
โปไฝ่ซใงใใ P1 ใใ P7 ใฏใFANOๅนณ้ขใจใชใฃใฆใใพใใP8 ใฏไฝ่จใใฎใงใใ
้ฐๆง้ๅ Nj ใไปฅไธใฎใใใซๅฎ็พฉใใพใใ
N1 = {7, 6, 4, 1}
N2 = {1, 7, 5, 2}
N3 = {2, 1, 6, 3}
N4 = {3, 2, 7, 4}
N5 = {4, 3, 1, 5}
N6 = {5, 4, 2, 6}
N7 = {6, 5, 3, 7}
N8 = {}
8 ๆใฎ้่ฒจใซไปฅไธใฎใใใซๅๅใใคใใพใใ
C{Pj, Nj}
ใใชใใกใ้่ฒจใฎๅๅใซใคใใฆใฏ้ฝๆง้ๅใจ้ฐๆง้ๅใฎ็ตใฟใฎ้ๅใงๅฎ็พฉใใพใใ
้ทใใชใใพใใใฎใงใๆ็จฟใใใฃใใๅบๅใใพใใ
โ ็ฌฌไธๆฎต้ใงใฎๆธฌๅฎใซใคใใฆ(ใคใฅใ)
7ไบบใฎๆ่ก่
ใซๆฌกใฎใใใซๆธฌๅฎใฎๆ็คบใใ ใใพใใใใชใใกใ
i ็ช็ฎใฎๆ่ก่
ใฏใPj ใฎ่ฆ็ด ใซ i ใๅซใใใใช้่ฒจ C{Pj, Nj} ใใฌใคใฌใผใซใฆใณใฟใผใง่จๆธฌใใพใใ
โๆฉ่ฆ่กจ | 1 2 3 4 5 6 7 โๆ่ก่
C{P1, N1} | 0 1 1 0 1 0 0
C{P2, N2} | 0 0 1 1 0 1 0
C{P3, N3} | 0 0 0 1 1 0 1
C{P4, N4} | 1 0 0 0 1 1 0
C{P5, N5} | 0 1 0 0 0 1 1
C{P6, N6} | 1 0 1 0 0 0 1
C{P7, N7} | 1 1 0 1 0 0 0
C{P8, N8} | 1 1 1 1 1 1 1
โปใใฎๆฉ่ฆ่กจใงใฏใ1 ใ็ซใฃใฆใใ้่ฒจใ่จๆธฌใใพใใ
้ฝๆงใฎใฌใใผใใใใๆ่ก่
ใฎ้ๅใ T ใจๅใฅใใพใใ
Tใใๅฝ้่ฒจใฎใใใใๆขใใจใใใใจใจใชใใพใใ
ใใจใใฐ T={2,3,5} ใชใใฐๅฝ้่ฒจใฏ C{P1, N1} ใจใใใใจใจใชใใพใใ
โ ่จๆธฌ็ตๆTใฎ่ฉไพกใซใคใใฆ
็ฐกๅใชใใฎใใ้ ใซใ
โ T = Pj ใจใชใ j ใใใใจใ
โป๏ผไบบใจใใซๆญฃใใใฌใใผใใๆๅบใใใใจใจใชใใพใใ
ๅฝ้่ฒจใฏใC{Pj, Nj}ใ
โกTใฎ่ฆ็ด ๆฐใ 2 ใฎใจใ
โปใใชใใก้ฝๆงใ้ฐๆงใจๅฝใฃใใฌใใผใใใฒใจใคใใฃใใใจใซใชใใพใใ
j = 8 ใ้คๅคใงใใพใใ
Pj โ T ใชใ j ใๅฏไธใซๅฎใพใใพใใ
ๅฝ้่ฒจใฏใC{Pj, Nj}ใ
โขTใฎ่ฆ็ด ๆฐใ 4 ใฎใจใ
โป้ฐๆงใ้ฝๆงใจๅฝใฃใใฌใใผใใใฒใจใคใใฃใใใจใซใชใใพใใ
j = 8 ใ้คๅคใงใใพใใ
Pj โ T ใชใ j ใๅฏไธใซๅฎใพใใพใใ
ๅฝ้่ฒจใฏใC{Pj, Nj}ใ
โฃTใฎ่ฆ็ด ๆฐใ 6 ใฎใจใ
โป้ฐๆงใ้ฝๆงใจๅฝใฃใใฌใใผใใใฒใจใคใใฃใใใจใซใชใใพใใ
ๅฝ้่ฒจใฏใC{P8, N8}ใ
ใใใพใงโ โกโขโฃใฏ T ใจๅฝ้่ฒจใฎ Pj ใจใฎใใใณใฐ่ท้ขใ 0 ใพใใฏ 1 ใชใฎใงใใใ
(็ถใใพใ)
โ ่จๆธฌ็ตๆTใฎ่ฉไพกใซใคใใฆ(ใคใฅใ)
โคTใฎ่ฆ็ด ๆฐใ 1 ใฎใจใ
โป้ฝๆงใ้ฐๆงใจๅฝใฃใใฌใใผใใใตใใคใใฃใใใจใซใชใใพใใ
j = 8 ใ้คๅคใงใใพใใ
ใใฎใจใ T ใฎ่ฆ็ด ใไฟกใใใใจใใงใใพใใ่ชคใฃใใตใใคใฎใฌใใผใใฎๅฝฑ้ฟใๅใใฆใใชใใใใงใใ
T โ Pj
ใจใชใ j ใฏ๏ผใคใใใพใใ(FANOๅนณ้ขใฎๆง่ณชใงใ)
๏ผใคใใๅฝ้่ฒจใฎๅ่ฃ C{Pj, Nj} ใซใคใใฆใฏ็ฌฌไบๆฎต้ใงใ(ใใไปฅไธใฏ่ชคใฃใใฌใใผใใ็บ็ใใชใใใ) ๅฆ็ๅฏ่ฝใจใชใใพใใ
โฅTใฎ่ฆ็ด ๆฐใ 5 ใฎใจใ
ๅฝ้่ฒจใฎๅ่ฃใจใใฆใตใใคใฎใฐใซใผใใ่ใใใใพใใ
โฅโ๏ผ
โปC{P8, N8} ใซใคใใฆใ้ฝๆงใ้ฐๆงใจ่ชคใฃใใฌใใผใใ๏ผ้็บ็ใใใฑใผในใงใใ
ๅฝ้่ฒจใฎๅ่ฃใจใใฆ
ใใใใฒใจใคใใฎใฐใซใผใใงใใ
โฅโ๏ผ
โปj=8 ใ้คๅคใใฆใฎ C{Pj, Nj} ใซใคใใฆใ้ฐๆงใ้ฝๆงใจ่ชคใฃใใฌใใผใใ๏ผ้็บ็ใใใฑใผในใงใใ
่ชคใฃใใฌใใผใใๅบใใๆ่ก่
ใฎๆทปๅญใฎๅคใ m,n ใจใใพใใ
{m} โ Pj ใชใ C{Pj, Nj} ใฏ ๏ผๅใใใพใใ
ใใใฏ FANOๅนณ้ขใฎๆง่ณชใงใใ
{n} โ Pj ใชใ C{Pj, Nj} ใฏ ๏ผๅใใใพใใ
ใใใ FANOๅนณ้ขใฎๆง่ณชใงใใ
{m,n} โ Pj ใชใ C{Pj, Nj} ใฏ ๏ผๅใใใพใใ
ใใใฏ FANOๅนณ้ขใฎๆง่ณชใงใใ
่ชคใฃใใฌใใผใ m,n ใๅซใใ C{Pj, Nj}ใฏ
3+3-1=5 ใใใ๏ผๅใใใพใใ
j=8 ใ้คๅคใใฆใฎ C{Pj, Nj} ใฎ๏ผๅใฎใใกใ
ๆฌ็ฉใฎ้่ฒจใจใใฆ้คๅคใงใใใฎใฏ๏ผๅใจใชใใๅฝ้่ฒจใฎๅ่ฃใฏ๏ผๅใจใชใใพใใ
ใใ่ฟ้ ใช่ซๆณใงใใใใ
T โ Pj ใๆบใใ j ใฏ๏ผใคใใใจใใใใจใจใชใใพใใ
โฅโ๏ผ
ไปฅไธใใใใใฎโฅใฎใฑใผในใงใฏใๅฝ้่ฒจใฎๅ่ฃใฎๆๆฐใฏ๏ผๆใจใชใใพใใใ
(ใคใฅใใพใใๆฌกใฏ็งใซใจใฃใฆใฎๅคฉ็ๅฑฑใงใDD++ ใใใใใ็ฅๆตใๆๅใใ้จๅใงใใ)
(ๆฌๆฅใฏๅค้ฃฏใฎๆฏๅบฆใใใชใใใฐใชใใชใ่บซๅใงใใฎใงใใฒใใฃใจใใใจๆๆฅใซใชใใใใใใพใใใ)
็งใซใจใฃใฆใ็ด่ฆณใจ้ใงใใใฎใงใใใฎๅคๆดใฏใใใใใใงใใ
6-2 ใฏใ้ฝๆงใ้ฐๆงใจๅฝใฃใๅ ฑๅใใชใไปฅไธใ้ฐๆงๅ ฑๅใฏๅ
จใฆไฟกใใฆใใใใใใง 5 ๆใๆฌ็ฉใจ็ขบๅฎใงใใพใใญใ
DD++ ใใใ[2217]โ ใใฃใจๅซใณใพใใใ
ใใใฏใใใงใใญโฆโฆ่ชๆใชใใฎใ็งใฎใใใซใใญใใใพใใใฆใฏใใกใงใใญโฆโฆ
ๆฐใๅใ็ดใใฆใไปฅไธใงใฏใAโB ใๅทฎ้ๅใฎ่กจ่จใจใใพใใ
ใ
โฆTใฎ่ฆ็ด ๆฐใ 3 ใฎใจใ
(ใใ ใใโ ใฎใฑใผในใฏ้คใใพใใ)
โป้ฝๆงใ้ฐๆงใซใใ่ชคใฃใใฌใใผใ๏ผ้ใจใ้ฐๆงใ้ฝๆงใซใใ่ชคใฃใใฌใใผใใ๏ผ้ใจใ่จ๏ผๆฌใฎ่ชคใฃใใฌใใผใใ็บ็ใใฆใใใฑใผในใงใใ
่ฉฑใฎ้ฝๅไธใT ใซๅบใฅใใฆUใไฝใใพใใUใๅ
จไฝ้ๅใงใชใใฆใใฟใพใใใ
U = {1, 2, 3, 4, 5, 6, 7}โT
ใใใฆใๅฝ้่ฒจใฎC{Pj, Nj}ใซใคใใฆ
Pj = {x, y, z}
Nj = {p, q, r, s}
ใจใใพใใ
T = {p, y, z,}
U = {x, q, r, s}
ใๆธฌๅฎใฎ็ตๆใจใใฆๅพใใใฆใใใใจใจใชใใพใใ
Tใฎ๏ผใคใฎ่ฆ็ด ใฎใใกใๅฝใฌใใผใใใฒใจใคใใใฎใงใใใฎๅฏ่ฝๆงใฏไธๅบฆ๏ผ้ใใใใพใใ
ๅฝ็ฉใๅคงๆๅญใงๆธใใจ
Pj = {X, y, z}
Pj = {x, Y, z}
Pj = {x, y, Z}
ใฎใฉใใใๅฎ็พใใฆใใใใจใจใชใใพใใ
Tใซๅซใพใใ๏ผใคใฎ่ฆ็ด ใฎใใก๏ผใคใ้ธใถใจใใใใใใซๅฏพๅฟใใฆ้่ฒจใใฒใจใคๅฎใพใใจใใใใจใจใชใใพใใ
ไปฅไธใใใใใฎโฆใฎใฑใผในใงใฏใๅฝ้่ฒจใฎๅ่ฃใฎๆๆฐใฏ๏ผๆใจใชใใพใใใ
ใใฆใ็ต่ซใงใใ
ไปฅไธใใพใจใใพใใจใ็ฌฌไธๆฎต้ใง๏ผไบบไธญใซ๏ผไบบๅใฎๅฝใฌใใผใใ็บ็ใใใจใใซใฏใๅฝ้่ฒจๅ่ฃใฏๅธธใซ๏ผๅใงใใใใจใใใใใพใใ
่ชคใใฌใใผใใฎๆฐใ 0 ใชใใ 1 ใงใใใจใใซใฏใๅฝ้่ฒจใฏ็ขบๅฎใใพใใ
ใๆๆณใ
ใใใกใใฃใจ็ฐกๅใซๆธใใใฐ่ฏใใฎใงใใใ
ๅ
ใซๆ็คบใใใฆใใใ ใใๆฉ่ฆ่กจใง
ๅใณใ0 ใจ 1 ใจใใใใใใชใใใใไธใงใไธ่จใซๅๆฒใใใฆใใใ ใใพใใ
C{P1, N1} | 1 0 0 1 0 1 1 //C4
C{P2, N2} | 1 1 0 0 1 0 1 //C6
C{P3, N3} | 1 1 1 0 0 1 0 //C7
C{P4, N4} | 0 1 1 1 0 0 1 //C3
C{P5, N5} | 1 0 1 1 1 0 0 //C5
C{P6, N6} | 0 1 0 1 1 1 0 //C2
C{P7, N7} | 0 0 1 0 1 1 1 //C1
C{P8, N8} | 0 0 0 0 0 0 0 //C0
ใชใใๅ่กใฎๅณ็ซฏใฏใใใใใๅงใใ่ชฌๆใฎ้ฝๅไธใๅ้่ฒจใซๆฐใใๅๅใฅใใใใใฎใงใใ
ใใใๅใฎๆไป็่ซ็ๅใฎ่จๅทใจใใฆใโใใไฝฟใใใจใจใใพใใ
ใใจใใฐใ 0110 โ 1010 = 1100 ใงใใ
1 โค n โค7 ใซใคใใฆ
C0 โ Cn = Cn
ใฏใ่ชๆใงใใญใ
ใใใฏใชใใใฎใใไปฅไธใฎใใใซใชใฃใฆใใใใจใงใใ
C3 = C2 โ C1
C5 = C4 โ C1
C6 = C4 โ C2
C7 = C4 โ C2 โ C1
ใคใพใใC1,C2,C4 ใใ็ฅใฃใฆใใใฐใ
ไปใซใคใใฆใฏใ๏ผ้ฒๆฐใฎไปๆใใซใใฃใฆๅฒใๅบใใใจใใใใจใซใชใใพใใ
ใใใฏ็งใซใจใฃใฆใฏ้่ชๆใชใใจใงใใฎใง
็ๆงใซใใๅ ฑๅใใๆฌก็ฌฌใงใใ
OEIS ใฎ
A075931
List of codewords in binary lexicode with Hamming distance 5 written as decimal numbers.
ใใใ
0,31,227,252,805,826,966,985,1354,1365,1449,1462,1647,1648,1676,1683
ใพใงใๅฉ็จใใฆ
็ฌฆๅท้ท 11 ใๆๅฐใใใณใฐ่ท้ข 5 ใฎ็ฌฆๅทใฎใใใๅใไปฅไธใฎใใใซไฝๆใใพใใใ
"12 0 3 00 4 0000"โโ่ฆๅบใ
"00 0 0 00 0 0000",//0
"00 0 0 00 1 1111",//1
"00 0 1 11 0 0011",//2
"00 0 1 11 1 1100",//
"01 1 0 01 0 0101",//4
"01 1 0 01 1 1010",
"01 1 1 10 0 0110",
"01 1 1 10 1 1001",
"10 1 0 10 0 1010",//8
"10 1 0 10 1 0101",
"10 1 1 01 0 1001",
"10 1 1 01 1 0110",
"11 0 0 11 0 1111",
"11 0 0 11 1 0000",
"11 0 1 00 0 1100",
"11 0 1 00 1 0011",
่ฆๅบใใซใคใใฆ่ชฌๆใใพใใ
"12 0 3 00 4 0000"
ใงใ1,2,3,4 ใฏใใใผใฟใใใ(4ใใใ)ใจใใฆไฝฟใใใใใไฝ็ฝฎใงใใไธไฝใใๆ้ ใซใใฆใใพใใ
"12 0 3 00 4 0000"
"01 1 0 01 1 1010",
ไธใฎไพใงใฏใ0101 ใๆๅณใใฆใใใ10้ฒใงใฏ 5 ใงใใใใใใ็ขบใใซ 0 ใชใชใธใณใง 5 ็ช็ฎใฎใใใๅใงใใใใจใซ็ๆใใฆ้ ใใใฐๅนธใใงใใ
ไธใฎไธ่ฆง่กจใฏใ4ใใใใฎใใผใฟใใใใฎ็ฌฆๅท่ชใใ11ใใใใซใจใณใณใผใใใใใฎใจใชใฃใฆใใพใใ
ๅๅใฎๆ็จฟใNo.2220 ใง็บ็ใใฆใใๆฉ่จถไธๆ่ญฐใช็พ่ฑกใใไธใงใใใใฆใใใฎใใซใคใใฆใใญใฐใฉใ ใงๆค่จผใใพใใใจใใใใชใผใฑใผใจใชใใพใใใ
"00 0 0 00 1 1111",//1
"00 0 1 11 0 0011",//2
"01 1 0 01 0 0101",//4
"10 1 0 10 0 1010",//8
ใ็ฅใฃใฆใใใฐใ
ไปใฎ11ๅใฎ็ฌฆๅท่ชใฏใๆไป็่ซ็ๅใงใใฃใฆ่จ็ฎใงใใใฎใงใใ
ใใใใใ่ชๆใ ใใใจใๆใใซใชใใใใใใใใใฃใใใใใใใใพใใใ
ใใใใชใใใงใใญใ
ใใฎ A075931 ใฎๆฐๅใฏใ0 ใใ้ ใซ 1 ใฅใคใใซใฆใณใใขใใใใฆใใใใใผใใซไธใซใใใฆใใ(ๅ
่กใใ)ๅ
จใฆใฎๆฐใจใใใณใฐ่ท้ขใ5ไปฅไธใจใชใๆฐใใฟใคใใฆใฏใใผใใซใซ่ฟฝๅ ใใฆๆบใ่พผใใงใใใ ใใงใไฝใฃใฆใใใใงใใ่ฒชๆฌฒใขใซใดใชใบใ ใงใใฃใฆใฐใชใผใใฃใซใๆใๆๅณใงใฏๆฑใไฝใๆนใ
ใชใฎใซใ[2220]ใฎๆ็จฟใง่งฆใใๆณๅใใใใใใใใใA075931 ใงใ็งใๅๆใซ่จญๅฎใใใ่ฆๅบใใใใ็ฌฆๅท่ชใฎๅคใ็ดใซ็คบใใฆใใใชใใฆใไธๆ่ญฐใงไธๆ่ญฐใงใชใใชใใฎใงใใ
ใใจใใฐใๆๅฐใใใณใฐ่ท้ขใ 6 ใงใ็ฌฆๅท้ทใ 13 ใ็ฌฆๅท่ชๆฐใ 13 ใฎใๆฌกใฎ็ฌฆๅทใซใฏใไป่ฉฑ้กใซใใฆใใ[ๆณๅ]ใ็งใฏใฟใคใใใใพใใใ
"0011101111101",
"1001110111110",
"0100111011111",
"1010011101111",
"1101001110111",
"1110100111011",
"1111010011101",
"1111101001110",
"0111110100111",
"1011111010011",
"1101111101001",
"1110111110100",
"0111011111010",
ใใผใฟใใใใใฉใใชใฎใใๆๆงใงใใใญใ
ใตใคใฏใชใใฏใงใใใใ
็ถบ้บใชไปๆใใงไฝใฃใๅฒใซใฏใ
ใฐใชใผใใฃใซไฝใฃใใใฎใซใๆใๆๅณใ่ฒ ใใฆใใใฎใงใใ
ใใฎ่ฌใ้ข็ฝใใฆใใใใใชใใงใใ
2221 ใง็งใฏ็กๆๅๆตใซใใผใฟใใใใฎไฝ็ฝฎใๆฑบใใฆใใใฎใงใใใ(ใคใพใใใงใใฏใใใใฎไฝ็ฝฎใๆฑบใใฆใใใฎใงใใ)
ใจใฃใใฎๆใซใณใณใฆใงใคใใใๆฑบใใฆ๏ผใพใใใใฉใใใฃใใใใ๏ผใ
ใใฎใใผใใซใๅคงใใใชใใจใใใใฎไฝ็ฝฎใฏใใใใใจใฎใใจใใพใใ