[SOLVED] HPC- Parallel Processing Assignment 3-Matrix puzzle

30.00 $

Category: Tags: , , , , ,
Click Category Button to View Your Next Assignment | Homework

You will receive the following solution file(s) instantly after successful payment:

zip file icon A3-wed9vz.zip (50.8 KB)
Assignment Instructions Updated Recently? Submit Below and we will provide new Solution!
Submit New Instructions
πŸ”’ Securely Powered by:
Secure Checkout
5/5 - (1 vote)

Matrix puzzle

Write a parallel C program using OpenMP such that :
Given a matrix where every element is either β€˜O’ or β€˜X’, replace β€˜O’ with β€˜X’ if surrounded by β€˜X’. A β€˜O’ (or a set of β€˜O’) is considered to be surrounded by β€˜X’ if there are β€˜X’ at locations just left and just right of it.
O’s at the edges will not be replaced
You should handle invalid input.

Sample input : 6 5

Sample output :

X

O

X

X

X

X

X

X

X

X

X

O

X

O

X

X

X

X

X

X

O

X

O

O

X

O

X

O

O

X

X

X

X

X

X

X

X

X

X

X

X

O

O

X

X

X

O

O

X

X

O

X

O

X

O

O

X

X

X

O

Deadline & Submission:

1. The assignment is in groups of maximum 2.
2. Code must be in C and openMP & you must run it before sending. 3. Cheating could lead to serious consequences.

  • A3-wed9vz.zip