<p>The k-means algorithm is one of the most commonly used clustering algorithms in the field of artificial intelligence. However, as the amount of data increases, traditional electronic computers face challenges such as low computational efficiency and high energy consumption when executing the k-means algorithm. The ternary optical computer (TOC), as a novel optoelectronic hybrid computer, employs optical processing and electrical control to perform data computations. This type of computer features a large number of data bits, carry-free addition, and low power consumption, making it well-suited to address the issues encountered by electronic computers in implementing the k-means algorithm. Leveraging the characteristics of TOC, such as its abundant data bits and reconfigurable processor, this paper designs a parallel k-means algorithm based on TOC. Additionally, this paper also proposes an implementation method for a TOC-based subtractor. This subtractor eliminates the need to take the opposite of the subtrahend, thus making the TOC more convenient for implementing the k-means algorithm. Finally, experimental validation was conducted on the TOC experimental platform. The results demonstrate that the implementation of the subtractor is correct and that the parallel k-means algorithm on TOC is feasible. Through performance comparison, it is shown that the time complexity of the multiplication process in calculating the distance between sample points and cluster centers can be optimized from <InlineEquation ID="IEq1"> <InlineMediaObject> <ImageObject Color="BlackWhite" FileRef="11227_2025_7016_Article_IEq1.gif" Format="GIF" Height="23" Rendition="HTML" Resolution="72" Type="Linedraw" Width="50" /> </InlineMediaObject> <EquationSource Format="TEX">\(O\left( {{n^2}} \right)\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi>O</mi> <mfenced close=")" open="("> <msup> <mi>n</mi> <mn>2</mn> </msup> </mfenced> </mrow> </math></EquationSource> </InlineEquation> to <InlineEquation ID="IEq2"> <InlineMediaObject> <ImageObject Color="BlackWhite" FileRef="11227_2025_7016_Article_IEq2.gif" Format="GIF" Height="19" Rendition="HTML" Resolution="72" Type="Linedraw" Width="40" /> </InlineMediaObject> <EquationSource Format="TEX">\(O\left( n \right)\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi>O</mi> <mfenced close=")" open="("> <mi>n</mi> </mfenced> </mrow> </math></EquationSource> </InlineEquation>, and under sufficient data bit conditions, it can achieve a time complexity of <InlineEquation ID="IEq3"> <InlineMediaObject> <ImageObject Color="BlackWhite" FileRef="11227_2025_7016_Article_IEq3.gif" Format="GIF" Height="19" Rendition="HTML" Resolution="72" Type="Linedraw" Width="67" /> </InlineMediaObject> <EquationSource Format="TEX">\(O(\log _2 n)\)</EquationSource> <EquationSource Format="MATHML"><math> <mrow> <mi>O</mi> <mo stretchy="false">(</mo> <msub> <mo>log</mo> <mn>2</mn> </msub> <mi>n</mi> <mo stretchy="false">)</mo> </mrow> </math></EquationSource> </InlineEquation>, exhibiting higher computational efficiency.</p>

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Design and implementation of parallel k-means algorithm based on ternary optical computer

  • Kai Song,
  • Haiming Zhang,
  • Huaqiong Ma,
  • Yongjun Sun,
  • Liping Yan

摘要

The k-means algorithm is one of the most commonly used clustering algorithms in the field of artificial intelligence. However, as the amount of data increases, traditional electronic computers face challenges such as low computational efficiency and high energy consumption when executing the k-means algorithm. The ternary optical computer (TOC), as a novel optoelectronic hybrid computer, employs optical processing and electrical control to perform data computations. This type of computer features a large number of data bits, carry-free addition, and low power consumption, making it well-suited to address the issues encountered by electronic computers in implementing the k-means algorithm. Leveraging the characteristics of TOC, such as its abundant data bits and reconfigurable processor, this paper designs a parallel k-means algorithm based on TOC. Additionally, this paper also proposes an implementation method for a TOC-based subtractor. This subtractor eliminates the need to take the opposite of the subtrahend, thus making the TOC more convenient for implementing the k-means algorithm. Finally, experimental validation was conducted on the TOC experimental platform. The results demonstrate that the implementation of the subtractor is correct and that the parallel k-means algorithm on TOC is feasible. Through performance comparison, it is shown that the time complexity of the multiplication process in calculating the distance between sample points and cluster centers can be optimized from \(O\left( {{n^2}} \right)\) O n 2 to \(O\left( n \right)\) O n , and under sufficient data bit conditions, it can achieve a time complexity of \(O(\log _2 n)\) O ( log 2 n ) , exhibiting higher computational efficiency.