Branch and Bound Method for Discrete Tomography Reconstruction of hv-convex Binary Matrices

Similar documents
Mathematical finance and linear programming (optimization)

A binary heap is a complete binary tree, where each node has a higher priority than its children. This is called heap-order property

Binary Image Reconstruction

Introduction Solvability Rules Computer Solution Implementation. Connect Four. March 9, Connect Four

DATA ANALYSIS II. Matrix Algorithms

Compression algorithm for Bayesian network modeling of binary systems

Algebra 2 Chapter 1 Vocabulary. identity - A statement that equates two equivalent expressions.

Transportation Polytopes: a Twenty year Update

Matrix Multiplication

8 Square matrices continued: Determinants

5.1 Bipartite Matching

Practical Guide to the Simplex Method of Linear Programming

Linear Programming. March 14, 2014

The Basics of FEA Procedure

Discrete Tomography in Discrete Deconvolution: Deconvolution of Binary Images Using Ryser s Algorithm

Circuits 1 M H Miller

Vector storage and access; algorithms in GIS. This is lecture 6

SHARP BOUNDS FOR THE SUM OF THE SQUARES OF THE DEGREES OF A GRAPH

Graphical degree sequences and realizations

Section 4.1 Rules of Exponents

AN ALGORITHM FOR DETERMINING WHETHER A GIVEN BINARY MATROID IS GRAPHIC

2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8]

December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B. KITCHENS

Why? A central concept in Computer Science. Algorithms are ubiquitous.

Lecture 3. Linear Programming. 3B1B Optimization Michaelmas 2015 A. Zisserman. Extreme solutions. Simplex method. Interior point method

FUZZY CLUSTERING ANALYSIS OF DATA MINING: APPLICATION TO AN ACCIDENT MINING SYSTEM

Row Echelon Form and Reduced Row Echelon Form

Math 1526 Consumer and Producer Surplus

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

4.1 Learning algorithms for neural networks

Design of LDPC codes

x = + x 2 + x

Question 2: How do you solve a matrix equation using the matrix inverse?

What is Linear Programming?

Can linear programs solve NP-hard problems?

Solving Systems of Linear Equations Using Matrices

Orthogonal Diagonalization of Symmetric Matrices

5.5. Solving linear systems by the elimination method

Linear Programming for Optimization. Mark A. Schulze, Ph.D. Perceptive Scientific Instruments, Inc.

General Framework for an Iterative Solution of Ax b. Jacobi s Method

A Constraint Programming based Column Generation Approach to Nurse Rostering Problems

DETERMINANTS TERRY A. LORING

Offline 1-Minesweeper is NP-complete

Enumerating possible Sudoku grids

Dynamic programming. Doctoral course Optimization on graphs - Lecture 4.1. Giovanni Righini. January 17 th, 2013

Math 1050 Khan Academy Extra Credit Algebra Assignment

Section 8.2 Solving a System of Equations Using Matrices (Guassian Elimination)

[1] Diagonal factorization

Simplex method summary

Face detection is a process of localizing and extracting the face region from the

A note on companion matrices

The four [10,5,4] binary codes

Lecture 3: Finding integer solutions to systems of linear equations

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay

Applied Algorithm Design Lecture 5

a 11 x 1 + a 12 x a 1n x n = b 1 a 21 x 1 + a 22 x a 2n x n = b 2.

SECRET sharing schemes were introduced by Blakley [5]

Linear Programming. Widget Factory Example. Linear Programming: Standard Form. Widget Factory Example: Continued.

LECTURE 5: DUALITY AND SENSITIVITY ANALYSIS. 1. Dual linear program 2. Duality theory 3. Sensitivity analysis 4. Dual simplex method

Minkowski Sum of Polytopes Defined by Their Vertices

MATH APPLIED MATRIX THEORY

arxiv: v1 [math.co] 7 Mar 2012

HYBRID GENETIC ALGORITHMS FOR SCHEDULING ADVERTISEMENTS ON A WEB PAGE

A linear combination is a sum of scalars times quantities. Such expressions arise quite frequently and have the form

Math Quizzes Winter 2009

Nonlinear Iterative Partial Least Squares Method

Administrative - Master Syllabus COVER SHEET

A Branch and Bound Algorithm for Solving the Binary Bi-level Linear Programming Problem

A Dynamic Programming Approach for Generating N-ary Reflected Gray Code List

5 INTEGER LINEAR PROGRAMMING (ILP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1

Review Jeopardy. Blue vs. Orange. Review Jeopardy

MS Excel Template Building and Mapping for Neat 5

Let s put together a Manual Processor

INTEGER PROGRAMMING. Integer Programming. Prototype example. BIP model. BIP models

Introduction to Matrix Algebra

Computer Graphics CS 543 Lecture 12 (Part 1) Curves. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

USE OF EIGENVALUES AND EIGENVECTORS TO ANALYZE BIPARTIVITY OF NETWORK GRAPHS

Recall that two vectors in are perpendicular or orthogonal provided that their dot

IEOR 4404 Homework #2 Intro OR: Deterministic Models February 14, 2011 Prof. Jay Sethuraman Page 1 of 5. Homework #2

Fast Sequential Summation Algorithms Using Augmented Data Structures

Duality in General Programs. Ryan Tibshirani Convex Optimization /36-725

Reminder: Complexity (1) Parallel Complexity Theory. Reminder: Complexity (2) Complexity-new

Reminder: Complexity (1) Parallel Complexity Theory. Reminder: Complexity (2) Complexity-new GAP (2) Graph Accessibility Problem (GAP) (1)

Inner Product Spaces

M. Sugumaran / (IJCSIT) International Journal of Computer Science and Information Technologies, Vol. 2 (3), 2011,

K80TTQ1EP-??,VO.L,XU0H5BY,_71ZVPKOE678_X,N2Y-8HI4VS,,6Z28DDW5N7ADY013

Union-Find Algorithms. network connectivity quick find quick union improvements applications

From Last Time: Remove (Delete) Operation

Modeling Curves and Surfaces

(67902) Topics in Theory and Complexity Nov 2, Lecture 7

ENUMERATION OF INTEGRAL TETRAHEDRA

3. Linear Programming and Polyhedral Combinatorics

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

1.2 Solving a System of Linear Equations

A Direct Numerical Method for Observability Analysis

Precalculus REVERSE CORRELATION. Content Expectations for. Precalculus. Michigan CONTENT EXPECTATIONS FOR PRECALCULUS CHAPTER/LESSON TITLES

Cloud Computing is NP-Complete

Vector Math Computer Graphics Scott D. Anderson

Session 7 Fractions and Decimals

Component Ordering in Independent Component Analysis Based on Data Power

Transcription:

Branch and Bound Method for Discrete Tomography Reconstruction of hv-convex Binary Matrices Miklós Póth Polytechnical Engineering College, Subotica Marka Oreškovića 6, 24 Subotica, Serbia, email: pmiki@vts.su.ac.yu Abstract: In this paper we show a new method for reconstructing binary matrices. We focus on the reconstruction of hv-convex matrices. We show that our algorithm finds all the solutions, and sort out the ones that do not comply to the hv-convex criteria. We also show that this algorithm works best for smaller matrices up to size 2x2 pixels. We make some notes on the possible speed-up strategys too. Keywords: Binary Matrices, Discrete Tomography, Reconstruction, Branch and Bound Introduction. Discrete Tomography In discrete tomography we are concerned with reconstruction of matrices from few (in our case two) projections. We take the horizontal and vertical projections of the binary matrix that is shown in Figure. Figure Example of a binary matrix to be reconstructed from two projections 293

M. Póth Branch and Bound Method for Discrete Tomography Reconstruction of hv-convex Binary Matrices In our case, we have [ 3 4 4 3 ] () C = [ 4 4 5 ] (2) where R represents the row sum vector, and C represent the column sum vector. If a solution exists, we can reconstruct the binary matrix based on these two vectors. The conditions for existence and uniqueness were studied by Ryser [3]. The trivial condition for the existence of the result is that the sum of entries in R and C are equal..2 hv-convex Matrices In this paper we are concerned with the reconstruction of hv-convex matrices. In such matrices the series of s is not broken in any of the rows or columns. This additional constraint considerabely reduces the number of possible solutions because no switching elements can occur in the entire matrix. Examples for matrix convexity are given in Figure 2. a) b) c) d) Figure 2 a) hv-convex matrix, b) h-convex matrix, c) v-convex matrix, d) no-convex matrix.3 Branch and Bound Branch and bound algorithms are methods for global optimization. A large number of real-world planning problems called combinatorial optimization problems share the following properties: They are optimization problems, are easy to state, and have a finite but usually very large number of feasible solutions. The majority of these problems share the property that that no polynomial method for their solution is known. Branch and bound (B&B) is by far the most widely used tool for solving large scale NP-hard combinatorial optimization problems. B&B is, however, an algorithm paradigm, which has to be filled out for each specific problem type, and numerous choices for each of the components exist. However, branch and bound algorithms can be slow. In the worst case they require effort that grows exponentially with problem size, but in some cases we are lucky, and the methods converge with much less effort. Since the search space is intractably large, some 294

implicit method is required in order to rule out regions of the search space that contain no interesting solutions. Branch and bound algorithms work by the divide and conquer principle: the search space is subdivided into smaller subregions (this subdivision is referred to as branching), and bounds are found on all the solutions contained in each subregion under consideration. The strength of the branch and bound approach comes when bounds on a large subregion show that it contains only inferior solutions, and so the entire subregion can be discarded without further examination. 2 Explanation of the Method The basic idea is to develop a tree in complyence with the content of the rows of the binary matrix. During tree development some nodes of the tree will not satisfy either the column sum condition, or the hv-convexity criteria. These agak will be cut out, narrowing the solution space. We find a solution every time we reach the leave of the tree. Let s consider a 4-by-4 binary matrix with row sum 2 3 2 (3) [ ] and column sum S = 3 3 (4) [ ] Since we wolud like to reconstruct a hv-convex matrix, from R ( ) = 2 we see that the s of the first row can be placed in three different positions, as shown in Figure 3. Generally, if we have to place k s on n positions, we have ( n k +) possibilities to do it. (If we want to reconstruct a matrix with no convexity constraint, we can place k s on n positions in n over k ways). Figure 3 Three possibilities to place two s on four positions Since no column sum violation occurred, we eliminate neither of the three nodes. We continue with the development of the tree in a similar way on the next (second) level. The structure of the tree on level 2 is shown in Figure 4. 295

M. Póth Branch and Bound Method for Discrete Tomography Reconstruction of hv-convex Binary Matrices Figure 4 The tree after two levels of development The four digit number at the nodes shows the current column sum. We now examine if any of the four digits exceed the given column sum. If so, we cut that edge, and we don t expand the tree further from that node. As we see from Figure 4, the leftmost and the rightmost nodes fail to satisfy this condition (22 and 22 exceeds the column sum 33 on the first and last digit respectively), and those nodes won t be further expanded. This is one source of the efficiency of the method. Since we aim to reconstruct a hv-convex matrix, we know that in any column of the matrix after a -to- transition no can follow. This is illustrated in Figure 5. To track the occurance of -to- transitions, we put a marker (dot in Figure 4) on the digit where the transition occurred. This marker means that on that position no further is possible. This measure also contributes to the efficiency of the method because it cuts out edges (nodes) narrowing the solution space. Figure 5 If a black pixel occurs behind a -to- transition, the hv-convexity condition fails The number of levels of the tree equals the number of rows of the matrix to be reconstructed (assuming that a solution exists). The number of solutions equals the number of leaves. 296

3 Performance Analysis and Speed-up Strategys 3. Matrix Rotation Let s consider a binary matrix with the following row and column sum C = [ 2 3 4] [ 4 3 2 ] After only two levels of development the tree will have 2 nodes from which only one (the last one) can be eliminated (Figure 6). The tree behaviour shows exponential growth, and that has great impact on computational time. Figure 6 The tree after two levels of deevlopment. Only two edges can be cut With matrix size increase, this growth becomes even more drastic. If the first two entries of the row sum matrix is and 2, on the second level of a x matrix we ll have 99 nodes (not necesserily all valid), and in such a case it would be very difficult and time consuming to process the matrix. One possible solution for the above problem could be matrix rotation. After a 9 CW rotation of the above matrix, R and C becomes: C = [ 4 3 2 ] [ 4 3 2 ] After this small manipulation the tree becomes much simpler and has only edges (Figure 7). 297

M. Póth Branch and Bound Method for Discrete Tomography Reconstruction of hv-convex Binary Matrices Figure 7 The tree is significantly simplified after the matrix rotation. Dot over digits shows that a -to- transition occured earlier on that path. In this case reconstruction must be followed by 9 CCW rotation of the resulting matrix. Such savings are not always possible, but rotation very often results in considerable speed-up. 3.2 Row Sum Maximum Start However, rotation does not necesserily help to increase the computational speed. Very often, the majority of the s is placed in the middle of the matrix, and we have very low numbers next to the borders. The following matrix is a good example. C = [ 2 2 6 8 7 3 2 ] [ 2 3 3 6 7 6 3 ] In this case, no rotation can prevent the tree from having at least 42 nodes at level 2, and even more nodes on lower levels. A possible solution to this problem could be to start from the row with most s, and to step one row up or down, depending on the number of s in those two rows. Doing so, we are certain that the tree will be minimal respecting the number of ones in each row, but we have to memorize an extra vector that will tell us the order of the rows. This is illustrated in Figure 8. 298

Figure 8 Developing the tree from with most s 3.3 Worst Case Scenarios The worst case appears when in all rows we have only one entry. In that case for an n-by-n matrix on the first level there will be n edges, on the second level there will be n- edges, and so on. It is easy to see that we ll have n! leaves on the last level. This is an extremely hard and time consuming problem. 4 Experimental Results During the experimental phase, it was verified that our method finds all the possible solutions that satisfy the column sum constrints and the hv-convexity constraint. With minor changes it is possible to skip the hv-convexity constraint, and to reconstruct all the matrices that satisfy only the column sums. For the following matrix C = [ 2 3 2 ] [ 3 3 ] our program gives the following solutions (Figure 9): 299

M. Póth Branch and Bound Method for Discrete Tomography Reconstruction of hv-convex Binary Matrices 3 Figure 9 All the solutions for the above matrix If we don t have the hv-convex condition, all the solutions are still valid, but we might have some extra solutions. If the above case, apart from those four solutions, we have two more (Figure ). Figure Two more solutions if only the column sum condition has to be fulfilled Conclusions In this paper we showed a new method for reconstructing binary matrices from its orthogonal projections. We introduced the branch and bound method for discrete tomography problems. By putting a constraint of hv-convexity to the matrix to be reconstructed, the majority of the developed tree can be cut before we get to the bottom leaves. Experimental results show that this method finds all the possible results that satisfy the row sum and column sum constraint. We investigated two possible speed-up possibilities. The first speed-up strategy used matrix rotation, while in the second strategy we started from the row that was mostly populated with s. On some test matrices rotation performed better, on other matrices the second speed-up strategy showed better results. So before reconstruction, it is suggested to analyze the matrix first, and according to the elements of R and C to decide which method to use. Acknowledgement The preparation of this paper would not have been possible without the support, suggestions and ideas of professor Kálmán Palagyi. References [] Marek Chrobak, Christoph Dürr: Reconstructing hv-convex Polyominoes from Orthogonal Projections, Information Processing Letters, March 999, Volume 69, Issue 6

[2] Richard Brualdi: Algorithms for Constructing (,)-Matrices with Prescribwd Row and Column Sum Vectors, Discrete Mathematics, Volume 36, Issue 23, pp. 2989 [3] H. J. Ryser: Matrices of Zeros and Ones, Bull. Amer. Math. Soc. Volume 66, Number 6 (96), pp. 442-464 [4] H. J. Ryser: Combinatorial Properties of Matrices of Zeros and Ones, Canad. J. Math. Vol. 9 (957) pp. 37-377 [5] Maciej Gebala: The Reconstruction of Convex Polyominoes from Horizontal and Verical Projections, Lecture Notes In Computer Science; Vol. 52, 998, pp. 35-359 [6] Alberto Del Lungo: Reconstructing Permutation Matrices from Diagonal Sums, Theor. Comput. Sci. 28(-2), 22, pp. 235-249 3