Indian Journal of Industrial and Applied Mathematics
  • Year: 2024
  • Volume: 15
  • Issue: 1and2

Automatic generation of recursive algorithms for list manipulation

  • Author:
  • Mauricio Sepúlveda Cárdenas1,*, Victor Parada Daza2,**, Juan Parra Galvez1,***, Roberto Acevedo3,****
  • Total Page Count: 15
  • Published Online: Dec 24, 2024
  • Page Number: 18 to 32

1Universidad San Sebastian, Bellavista N° 7, Recoleta, Santiago, Chile, Orcid: 0000-0002-5522-3194, 0000-0001-6847-0285

2Universidad de Santiago de Chile, Santiago, Chile, Orcid: 0000-0002-8649-5694

3Universidad San Sebastían, Bellavista 7, 0000-0001-9244-0019

(*Corresponding author) E-mail: mauricio.sepulveda@uss.cl

**victor.parada@usach.cl

***juan.parra@uss.cl

****roberto.acevedo.llanos@gmail.com

Online Published on 24 December, 2024.

Abstract

Recursion consists of building algorithms based on your own definition. This article presents recursive algorithms automatically generated via Genetic Programming (PG) with one or more recursive calls for five list manipulation problems, which are interpretable and allow new knowledge to be obtained. The main difficulty that arises in the automatic generation of recursive programs is the handling of the halting problem, which several works have managed to overcome in bounded recursion problems. This work analyses and criticises the implemented techniques and proposes a solution for when explicit recursive algorithms are evolved that solve problems where the elements of a list must be manipulated. Examples of programs evolved in Python 3.6 that contain one or more recursions and whose code is included for verification are presented and analysed. In conclusion, fully functional and interpretable recursive algorithms are generated in all cases. Furthermore, the evolutionary process allows the generation of algorithms with a greater number of recursions, although without a significant contribution to the algorithm during its execution. Finally, it is observed that the challenge to generate this type of algorithm is mainly in the fitness function.

Keywords

Genetic programming, Recursion, List, Interpretable algorithms