Skip to content

The objective of this exercise is to develop an algorithm to place n*n distinct natural numbers, ranging from 1 to a value k (where k > n*n), on an n x n board. The constraint is that the sum of the numbers in each row and each column must be equal to a specific value S.

Notifications You must be signed in to change notification settings

analiaBurgosDev/java_backtracking_Magic-Board

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Descripción del Problema

El objetivo de este ejercicio es desarrollar un algoritmo para ubicar nn números naturales distintos, entre 1 y un valor k (donde k > nn), en un tablero de tamaño n x n. La restricción es que la suma de los números en cada fila y cada columna debe ser igual a un valor específico S.

Enfoque

  • Búsqueda Combinatoria: El algoritmo explora posibles distribuciones de números utilizando técnicas de backtracking y satisfacción de restricciones.
  • Equilibrio en la Matriz: La solución garantiza que las sumas de filas y columnas se mantengan mientras se ubican los números únicos en la cuadrícula.

Aplicaciones

Este ejercicio es útil en problemas de asignación de recursos en cuadrículas, diseño de juegos estratégicos y optimización combinatoria en planificación y programación de sistemas.


Problem Description

The objective of this exercise is to develop an algorithm to place nn distinct natural numbers, ranging from 1 to a value k (where k > nn), on an n x n board. The constraint is that the sum of the numbers in each row and each column must be equal to a specific value S.

Approach

  • Combinatorial Search: The algorithm explores possible distributions of numbers using backtracking and constraint satisfaction techniques.
  • Matrix Balancing: The solution ensures that row and column sums are maintained while placing unique numbers in the grid.

Applications

This exercise is relevant in problems involving grid-based resource allocation, strategic game design, and combinatorial optimization in scheduling and planning systems.

About

The objective of this exercise is to develop an algorithm to place n*n distinct natural numbers, ranging from 1 to a value k (where k > n*n), on an n x n board. The constraint is that the sum of the numbers in each row and each column must be equal to a specific value S.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages