Serviços Personalizados
Journal
Artigo
Indicadores
- Citado por SciELO
- Acessos
Links relacionados
- Citado por Google
- Similares em SciELO
- Similares 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.