Prolog
This programming language may be used to instruct a computer to perform a task.
Listed below are all of the tasks on Rosetta Code which have been solved using Prolog.
This programming language may be used to instruct a computer to perform a task.
Execution method: | Interpreted or compiled |
---|---|
Garbage collected: | Yes |
Parameter passing methods: | By value |
Type strength: | Strong |
Type compatibility: | Structural |
Type checking: | Dynamic |
See Also: |
|
Your Help Needed
If you know Prolog, please write code for some of the tasks not implemented in Prolog.
Prolog is a logic programming language. It is programmed declaratively, using resolution and backtracking to confirm propositions based on declared facts and rules.
If you know Prolog, please write code for some of the tasks not implemented in Prolog.
Subcategories
This category has the following 3 subcategories, out of 3 total.
Pages in category "Prolog"
The following 454 pages are in this category, out of 454 total.
A
- A+B
- Abbreviations, automatic
- Abbreviations, easy
- ABC problem
- Abundant, deficient and perfect number classifications
- Accumulator factory
- Ackermann function
- AKS test for primes
- Algebraic data types
- Align columns
- Aliquot sequence classifications
- Almost prime
- Alternade words
- Amb
- Amicable pairs
- Anagrams
- Anagrams/Deranged anagrams
- Animate a pendulum
- Animation
- Anonymous recursion
- Anti-primes
- Apply a callback to an array
- Arbitrary-precision integers (included)
- Arithmetic evaluation
- Arithmetic-geometric mean
- Arithmetic/Integer
- Arithmetic/Rational
- Array concatenation
- Array length
- Arrays
- Assertions
- Associative array/Creation
- Associative array/Iteration
- Attractive numbers
- Averages/Arithmetic mean
- Averages/Median
- Averages/Root mean square
B
C
- Caesar cipher
- Calculating the value of e
- Calendar
- Calkin-Wilf sequence
- Call a foreign-language function
- Carmichael 3 strong pseudoprimes
- Cartesian product of two or more lists
- Case-sensitivity of identifiers
- Catalan numbers
- Catamorphism
- Change e letters to i in words
- Changeable words
- Character codes
- Chat server
- Check that file exists
- Chernick's Carmichael numbers
- Chinese remainder theorem
- Chinese zodiac
- Chowla numbers
- Church numerals
- Circular primes
- Closest-pair problem
- Closures/Value capture
- Collections
- Combinations
- Combinations with repetitions
- Comma quibbling
- Comments
- Compare a list of strings
- Compile-time calculation
- Compiler/lexical analyzer
- Compiler/virtual machine interpreter
- Compound data type
- Concurrent computing
- Conditional structures
- Constrained random points on a circle
- Continued fraction
- Convert seconds to compound duration
- Conway's Game of Life
- Copy a string
- Copy stdin to stdout
- Count in octal
- Count occurrences of a substring
- Count the coins
- Cramer's rule
- Create an HTML table
- CSV data manipulation
- CSV to HTML translation
- Currying
D
- Date format
- Day of the week
- Department numbers
- Detect division by zero
- Determine if a string has all the same characters
- Determine if a string has all unique characters
- Determine if a string is collapsible
- Determine if a string is numeric
- Determine if a string is squeezable
- Digital root
- Dijkstra's algorithm
- Dinesman's multiple-dwelling problem
- Dining philosophers
- Discordian date
- Dot product
- Dragon curve
- Draw a cuboid
- Dutch national flag problem
- Dynamic variable names
E
- Egyptian division
- Egyptian fractions
- Elementary cellular automaton
- Empty directory
- Empty string
- Entropy
- Enumerations
- Environment variables
- Equilibrium index
- Esthetic numbers
- Ethiopian multiplication
- Euler's identity
- Euler's sum of powers conjecture
- Even or odd
- Evolutionary algorithm
- Exceptions
- Execute a Markov algorithm
- Execute a system command
- Execute Brain****
- Exponentiation operator
F
- Factorial
- Factors of a Mersenne number
- Factors of an integer
- Farey sequence
- Fast Fourier transform
- Faulhaber's triangle
- Fibonacci sequence
- Filter
- Find common directory path
- Find the intersection of a line with a plane
- Find words with alternating vowels and consonants
- Finite state machine
- First-class functions
- Five weekends
- FizzBuzz
- Flatten a list
- Floyd's triangle
- Floyd-Warshall algorithm
- Four bit adder
- Fractal tree
- Fractran
- Function composition
- Function definition
- Fusc sequence
G
- Galton box animation
- General FizzBuzz
- Generate lower case ASCII alphabet
- Generic swap
- Gray code
- Greatest common divisor
- Greatest element of a list
- Greatest subsequential sum
- Guess the number
- Guess the number/With feedback
- Guess the number/With feedback (player)
- GUI component interaction
- GUI enabling/disabling of controls
H
- Hailstone sequence
- Hamming numbers
- Happy numbers
- Harmonic series
- Harshad or Niven series
- Hash from two arrays
- Hash join
- Hello world/Graphical
- Hello world/Line printer
- Hello world/Text
- Hello world/Web server
- Higher-order functions
- Hofstadter Figure-Figure sequences
- Honeycombs
- Horner's rule for polynomial evaluation
- HTTP
- Huffman coding
- Hunt the Wumpus
I
K
L
- Lah numbers
- Langton's ant
- Largest int from concatenated ints
- Largest number divisible by its digits
- Largest prime factor
- Last letter-first letter
- Law of cosines - triples
- Leap year
- Least common multiple
- Left factorials
- Letter frequency
- Levenshtein distance
- List comprehensions
- Literals/String
- Logical operations
- Long multiplication
- Long primes
- Long year
- Longest common prefix
- Longest common subsequence
- Longest common substring
- Longest increasing subsequence
- Look-and-say sequence
- Loop over multiple arrays simultaneously
- Loop Structures
- Loops/Continue
- Loops/Do-while
- Loops/Downward for
- Loops/For
- Loops/For with a specified step
- Loops/Foreach
- Loops/Infinite
- Loops/N plus one half
- Loops/While
- Loops/With multiple ranges
- Lucas-Lehmer test
- Ludic numbers
- Lychrel numbers
M
- Magic constant
- Mandelbrot set
- Mastermind
- Matrix multiplication
- Matrix transposition
- Maximum triangle path sum
- Maze generation
- Maze solving
- Menu
- Merge and aggregate datasets
- Mersenne primes
- Mertens function
- Metaprogramming
- Middle three digits
- Miller–Rabin primality test
- Minesweeper game
- Minimum multiple of m where digital sum equals m
- Modular arithmetic
- Modular exponentiation
- Modular inverse
- Monty Hall problem
- Morse code
- Multiplication tables
- Multisplit
- Munching squares
- Mutex
- Mutual recursion
N
P
- Palindrome detection
- Palindromic gapful numbers
- Pangram checker
- Parallel calculations
- Parse command-line arguments
- Parsing/RPN calculator algorithm
- Partial function application
- Partition an integer x into n primes
- Partition function P
- Pascal's triangle
- Pascal's triangle/Puzzle
- Password generator
- Peano curve
- Pell's equation
- Penney's game
- Perfect numbers
- Permutations
- Pi
- Pick random element
- Pierpont primes
- Playing cards
- Poker hand analyser
- Polymorphism
- Power set
- Primality by trial division
- Prime conspiracy
- Prime decomposition
- Priority queue
- Program name
- Program termination
- Proper divisors
- Pythagorean triples
R
S
- Search a list
- Self-describing numbers
- Sequence of primes by trial division
- Set
- Set puzzle
- Sexy primes
- Shell one-liner
- Short-circuit evaluation
- Show ASCII table
- Sierpinski arrowhead curve
- Sierpinski carpet
- Sierpinski pentagon
- Sierpinski triangle
- Sierpinski triangle/Graphical
- Sieve of Eratosthenes
- Simple windowed application
- Sleep
- Sockets
- Solve a Hidato puzzle
- Solve a Hopido puzzle
- Solve a Numbrix puzzle
- Solve the no connection puzzle
- Solve triangle solitare puzzle
- Sort a list of object identifiers
- Sort an integer array
- Sort disjoint sublist
- Sort numbers lexicographically
- Sort using a custom comparator
- Sorting algorithms/Bogosort
- Sorting algorithms/Bubble sort
- Sorting algorithms/Cocktail sort
- Sorting algorithms/Insertion sort
- Sorting algorithms/Merge sort
- Sorting algorithms/Patience sort
- Sorting algorithms/Permutation sort
- Sorting algorithms/Quicksort
- Sorting algorithms/Selection sort
- Sorting algorithms/Sleep sort
- Soundex
- Spelling of ordinal numbers
- Spiral matrix
- Stable marriage problem
- Stack
- Stair-climbing puzzle
- State name puzzle
- Stirling numbers of the first kind
- Stirling numbers of the second kind
- String interpolation (included)
- String matching
- String prepend
- Strip a set of characters from a string
- Strip block comments
- Strip comments from a string
- Strip whitespace from a string/Top and tail
- Substitution cipher
- Substring
- Substring/Top and tail
- Successive prime differences
- Sudoku
- Sum and product of an array
- Sum digits of an integer
- Sum multiples of 3 and 5
- Sum of a series
- Sum of squares
- Sylvester's sequence
- Symmetric difference
- System time