Find Jobs
Hire Freelancers

tromino tiling

$10-30 USD

Completed
Posted about 1 year ago

$10-30 USD

Paid on delivery
Given a natural number n and a chess board with 2n squares on each side (the length of the side is 2n) with a missing square in any location, you will use the divide and conquer approach to design and implement an algorithm (see the algorithm skeleton from the class slides) to cover the chess board (with a missing square) by an arrangement of trominoes (an L-shaped arrangement of three squares; see figure below) such that all trominoes are confined to the boundaries of the chess board, and no tromino overlaps another. We will use x coordinate and y coordinate to record the location of the missing square. It is convenient to treat the origin (0, 0) as the lower left corner of the board. For instance, the coordinate of the missing square in the first figure above is (0, 1); the coordinate of the missing square in the second figure above is (1, 1). You will make a function called tromino as below. void tromino /* function to do tiling */ ( int x_board, int y_board, int x_missing, int y_missing, int board_size ); /* size of board, which is a power of 2*/ The main program should call tromino( 0, 0, x_missing, y_missing, board_size), which allows the user to input board_size by prompting the line “Please enter size of board (0 to quit):” first, then to input coordinates of missing square for x_missing and y_missing by prompting the line “Please enter coordinates of missing square (separate by a space):”. For the tromino function below, void tromino /* function to do tiling */ ( int x_board, int y_board, int x_missing, int y_missing, /* x coordinate of board */ /* y coordinate of board */ /* x coordinate of missing square */ /* y coordinate of missing square */ /* x coordinate of board */ /* y coordinate of board */ /* x coordinate of missing square */ /* y coordinate of missing square */ int board_size ) /* size of board, which is a power of 2*/ you will need to set up the base case for board_size = 2. What you need to do in the base case is to decide which L shape to be put in the three squares. Please print “LR” (Lower Right) in all three squares for the first L shape (see the figure above), print “LL” (Lower Left) for the second L shape (see the figure above), “UL” (Upper Left) for the third L shape (see the figure above), “UR” (Upper Right) for the forth L shape (see the figure above). You will do the following four recursive calls for the four half_size (board_size/2) subboards: upper left subboard, upper right subboard, lower left subboard, and lower right subboard. /* tile the four subboards */ tromino( x_board, y_board + half_size, x_upper_left, y_upper_left, half_size ); tromino( x_board + half_size, y_board + half_size, x_upper_right, y_upper_right, half_size ); tromino( x_board, y_board, x_lower_left, y_lower_left, half_size ); tromino( x_board + half_size, y_board, x_lower_right, y_lower_right, half_size ); The main program should output the arrangement of trominoes at each coordinate location. For example, when board_size =2, x_missing = 0, and y_missing = 1 (the first figure above), the output should be as follows (please use “MS” to stand for the missing square). MS LR LR LR
Project ID: 36194784

About the project

8 proposals
Remote project
Active 1 yr ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hi there yeah I am expert in C and I can help you out for sure kindly send me a message we'll discuss further Looking forward to hear you Thank you
$20 USD in 1 day
5.0 (196 reviews)
5.8
5.8
User Avatar
✅ Full Experiences and Profound Knowledge in ⭐Algorithm and Data Structure with C/C++/Java Programming⭐✅. Hi, how are you? I am very confident to complete your project perfectly. I can start your work right now. Of course, since I am new here, then my job history and feedback score on freelancer is not sufficient, but you don’t need to worry! I can guarantee the quality of the job and deliver the result on time. I hope we will discuss in more detail via chat. Best regards! https://www.freelancer.com/u/KawlCarter
$20 USD in 1 day
5.0 (24 reviews)
4.9
4.9
8 freelancers are bidding on average $20 USD for this job
User Avatar
Hello! I am very interested in your post project. While I read your description carefully, I was excited with feeling that I would be able to satisfy for your requirements in this job. We can negotiate on price/Budget for your project, you will get good result. looking forward to work with you.
$20 USD in 1 day
5.0 (4 reviews)
1.9
1.9
User Avatar
Hi, Client. I am a math expert and python/R/Matlab/C++ programmer. And I have full experiences with similar projects. Your project is just for me. I can do this work in a short time and high quality will be guaranteed.
$20 USD in 1 day
5.0 (2 reviews)
1.7
1.7
User Avatar
Hello! I hope this message finds you well. I am writing in response to the c++ project you posted. I am confident that I can deliver the requested result for the tromino function as I have experience working with C/C++ and Java and have completed similar projects in the past. Please let me know if you have any questions or if there is any additional information I can provide to help you. Thank you for considering my application, and I look forward to the opportunity to work with you. Best regards, Abdellah
$30 USD in 1 day
4.8 (1 review)
1.4
1.4
User Avatar
I have completed your project. Hope you can award it to me so I can send it to you :). Lets discuss further details and come to an agreement
$20 USD in 7 days
5.0 (1 review)
0.5
0.5
User Avatar
Hi, How are u? I have full experience with ✅ Java, C++, Algorithms... ✅. I have worked with these fields for a long time. I can start soon and complete your project with high quality in time. Looking forward to hearing from you soon. Thank you!
$20 USD in 1 day
0.0 (1 review)
0.0
0.0

About the client

Flag of UNITED STATES
Binghamton, United States
5.0
4
Payment method verified
Member since Sep 27, 2022

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759) & Freelancer Online India Private Limited (CIN U93000HR2011FTC043854)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.