Definition of recursive

recursiveadjective

đệ quy

/rɪˈkɜːsɪv//rɪˈkɜːrsɪv/

The word "recursive" has its roots in the Latin word "recursus," meaning "running back." In mathematics, the term was first used to describe the iterative process of defining a function in terms of itself, such as the Fibonacci sequence. This concept was developed in the 17th century by mathematicians like Gottfried Wilhelm Leibniz and Leonhard Euler. Over time, the concept of recursion spread to other fields, including computer science and linguistics. In computer science, a recursive function is one that calls itself repeatedly until it reaches a base case that stops the recursion. In linguistics, recursivity refers to the phenomenon where a phrase or sentence contains itself as a component. Today, the term "recursive" is widely used in many disciplines, including mathematics, computer science, philosophy, and psychology, to describe processes or structures that involve repetition or self-reference.

namespace
Example:
  • The process of defining a function in terms of itself is called a recursive definition. For example, the factorial function is defined recursively as n! = n * (n-1)!.

    Quá trình định nghĩa một hàm theo chính nó được gọi là định nghĩa đệ quy. Ví dụ, hàm giai thừa được định nghĩa đệ quy là n! = n * (n-1)!.

  • Recursive algorithms aim to solve problems by breaking them down into smaller subproblems of the same type until a base case is reached.

    Thuật toán đệ quy nhằm giải quyết vấn đề bằng cách chia nhỏ chúng thành các bài toán con nhỏ hơn cùng loại cho đến khi đạt được trường hợp cơ sở.

  • The tree structure used in recursive algorithms is called a recursion tree, and it can be helpful in understanding the efficiency and complexity of such algorithms.

    Cấu trúc cây được sử dụng trong các thuật toán đệ quy được gọi là cây đệ quy và nó có thể hữu ích trong việc hiểu hiệu quả và độ phức tạp của các thuật toán như vậy.

  • Recursion is a key concept in functional programming, where functions are defined without using any state or external variables.

    Đệ quy là một khái niệm quan trọng trong lập trình hàm, trong đó các hàm được định nghĩa mà không sử dụng bất kỳ biến trạng thái hoặc biến ngoài nào.

  • Recursive functions can also be used in computer graphics to generate fractals and other geometric shapes.

    Các hàm đệ quy cũng có thể được sử dụng trong đồ họa máy tính để tạo ra các hình fractal và các hình dạng hình học khác.

  • The use of recursion in programming can sometimes lead to a stack overflow error, where the function calls stack overflows and causes the program to crash.

    Việc sử dụng đệ quy trong lập trình đôi khi có thể dẫn đến lỗi tràn ngăn xếp, khi đó hàm gọi tràn ngăn xếp và khiến chương trình bị sập.

  • To avoid stack overflow errors in recursive functions, alternative approaches like iterative solutions or tail recursion should be considered.

    Để tránh lỗi tràn ngăn xếp trong các hàm đệ quy, cần cân nhắc các phương pháp thay thế như giải pháp lặp hoặc đệ quy đuôi.

  • Tail recursion refers to a recursive function that's called only at the very end of its own computation, preventing the overhead of maintaining a recursion stack.

    Đệ quy đuôi đề cập đến một hàm đệ quy chỉ được gọi ở phần cuối của quá trình tính toán của chính nó, ngăn chặn chi phí duy trì ngăn xếp đệ quy.

  • Recursive search algorithms like binary search and pathfinding algorithms like depth-first search and breadth-first search are commonly used in computational complexity theory.

    Các thuật toán tìm kiếm đệ quy như tìm kiếm nhị phân và các thuật toán tìm đường như tìm kiếm theo chiều sâu và tìm kiếm theo chiều rộng thường được sử dụng trong lý thuyết độ phức tạp tính toán.

  • In computer science, recursion is a powerful concept that enables the implementation of sophisticated and complex algorithms across a wide range of data structures and problems.

    Trong khoa học máy tính, đệ quy là một khái niệm mạnh mẽ cho phép triển khai các thuật toán phức tạp và tinh vi trên nhiều cấu trúc dữ liệu và vấn đề khác nhau.