SciELO - Scientific Electronic Library Online

 
vol.9 número18The Schottky diode as attenuator of the Seebeck effect on a Peltier cell for a PID temperature controlModeling the interaction energy of silica nanoparticles prepared in microemulsions índice de autoresíndice de assuntospesquisa de artigos
Home Pagelista alfabética de periódicos  

Serviços Personalizados

Journal

Artigo

Indicadores

Links relacionados

  • Em processo de indexaçãoCitado por Google
  • Não possue artigos similaresSimilares em SciELO
  • Em processo de indexaçãoSimilares em Google

Compartilhar


Entre Ciencia e Ingeniería

versão impressa ISSN 1909-8367

Resumo

TREJOS, O. I. Comparison of two algorithms in order to find Pythagorean triples using two different programming paradigms. Entre Ciencia e Ingenieria [online]. 2015, vol.9, n.18, pp.84-94. ISSN 1909-8367.

Abstract In this article we analyze the algorithmic characteristics of two solutions for the problem to find Pythagorean triples in a specific range from 1 to n to a defined value of n as an integer. We also make a comparison between the solution implemented with functional paradigm in Scheme language environment Dr. Racket version 6.1 and the solution implemented with imperative paradigm in C++ language environment Dev C++ version 5.8.0. The comparison of these solutions is made from the perspective of two different programming paradigms. We analyze the pure codification, the logic used in the implementation and the performance and efficiency using the computer timer. Both programs present two formats to show the results in the display. These comparisons not only permit to establish possible relations between the programming computer paradigms (functional and imperative) but also let us to think about a hybrid solution from the best of each solution implemented. Each implementation is absolutely original product of the research and the initiative and experience of the author of this article.

Palavras-chave : algorithm; functional programming; imperative programming cyclic process; recursion; Pythagorean triples.

        · resumo em Espanhol     · texto em Espanhol     · Espanhol ( pdf )

 

Creative Commons License Todo o conteúdo deste periódico, exceto onde está identificado, está licenciado sob uma Licença Creative Commons