3 research outputs found

    PARALLEL NUMERICAL COMPUTATION: A COMPARATIVE STUDY ON CPU-GPU PERFORMANCE IN PI DIGITS COMPUTATION

    Full text link
    As the usage of GPU (Graphical Processing Unit) for non-graphical computation is rising, one important area is to study how the device helps improve numerical calculations. In this work, we present a time performance comparison between purely CPU (serial) and GPU-assisted (parallel) programs in numerical computation. Specifically, we design and implement the calculation of the hexadecimal -digit of the irrational number Pi in two ways: serial and parallel. Both programs are based upon the BBP formula for Pi in the form of infinite series identity. We then provide a detailed time performance analysis of both programs based on the magnitude. Our result shows that the GPU-assisted parallel algorithm ran a hundred times faster than the serial algorithm. To be more precise, we offer that as the value  grows, the ratio between the execution time of the serial and parallel algorithms also increases. Moreover, when  it is large enough, that is This GPU efficiency ratio converges to a constant, showing the GPU's maximally utilized capacity. On the other hand, for sufficiently small enough, the serial algorithm performed solely on the CPU works faster since the GPU's small usage of parallelism does not help much compared to the arithmetic complexity

    Smartphone-Based Digital Image Analysis for Qualitative Classification of Food Dyes Using Machine Learning: Effects of Color Space and Lighting Conditions

    Full text link
    Smartphone-based digital image analysis (DIA) has emerged as an affordable and accessible method for chemical analysis, particularly in colorimetry. While most existing studies have focused on quantitative applications, this study explores a machine learning–assisted DIA approach for the qualitative classification of synthetic food dyes. Digital images of nine food dyes solutions (Carmoisine, Sunset Yellow, Allura Red, Ponceau 4R, Tartrazine, Fast Green FCF, Brilliant Blue FCF, Quinoline Yellow WS, and Indigo Carmine), were captured under both controlled (closed) and open lighting conditions using a smartphone camera. The images were subsequently processed to extract color values in different color spaces, namely RGB, normalized RGB (rgb), HSL, and CIELAB. These values served as input features for a k-nearest neighbors (KNN) classifier trained to identify the dye present in each solution. The KNN model performed well on model solutions, with at least 86% accuracy across all color spaces and lighting conditions. To assess practical applicability, the classifier was also tested on seven commercial food and health products. The results show that HSL color space yielded the highest classification accuracy in the commercial sample testing, across both lighting setups, with the open condition consistently producing better performance. These findings demonstrate the potential use of smartphone-based DIA combined with machine learning for low-cost, portable, and reliable solutions for qualitative colorimetric analysis.

    Realization of Bernstein-Vazirani quantum algorithm in an interactive educational game

    Full text link
    Quantum algorithms are celebrated for their computational superiority over classical counterparts, yet they pose significant learning challenges for non-physics audiences. Among these, the Bernstein-Vazirani (BV) algorithm stands out for its quantum speedup by efficiently identifying a secret binary string. However, the accessibility of such algorithms remains constrained by their inherent technical complexity. To address this educational gap, this paper introduces a gamified, web-based tool that innovatively reinterprets the BV algorithm’s complex mathematical settings through an into engaging scenario of identifying broken lamps. Players assume the role of an investigator, utilizing both classical and quantum solvers to identify faulty lamps with minimal queries. By transforming the BV algorithm into an intuitive gameplay experience, the tool helps reducing technical barriers, making quantum concepts much more comprehensible for educators and students than traditional methods that demand rigorous mathematical understanding. Developed using Qiskit, IBM’s Python package for quantum computation, and deployed via Flask, a popular Python microframework for building web applications, the game effectively simplifies complex quantum algorithms while demonstrating the practical applications of quantum speedup. This contribution advances quantum education by merging technical depth with interactive design, fostering a broader understanding of quantum principles and inspiring new innovations in gamified learning
    corecore