Two Plus Two Older Archives  

Go Back   Two Plus Two Older Archives > Other Topics > Science, Math, and Philosophy
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-27-2005, 04:51 PM
TomCollins TomCollins is offline
Senior Member
 
Join Date: Jul 2003
Location: Austin, TX
Posts: 172
Default Excel Deleting Problem

Suppose you have a block of cell's in a "triangle" you want to "delete". You can delete them by selecting a rectangle.

For example:

Here is a triangle of length 6.

XOOOOO
XXOOOO
XXXOOO
XXXXOO
XXXXXO
XXXXXX

And you want to delete the X's.

OOOOO
OOOO
OOO
OO
O



So one deletion could be:
OOOOO
XOOOO
XXOOO
XXXOO
XXXXO
XXXXX, since I can delete a rectangle of cells in the first column. I can delete multiple rows and columns, but must delete an entire rectangle.

So the question:
For a triangle of size n, what is the least number of deletions to get rid of all of the X's?

What is the algorithm for it?

This question may be interesting or extremely trivial, and I don't know the answer either.
Reply With Quote
  #2  
Old 07-27-2005, 04:59 PM
gumpzilla gumpzilla is offline
Senior Member
 
Join Date: Feb 2005
Posts: 1,401
Default Re: Excel Deleting Problem

I think it's pretty trivial. I'll be astonished if the answer is not n. It's clear it takes no more than n, so the "hard" part would be showing you can't do it in fewer. I'm pretty sure you can do this inductively easily.
Reply With Quote
  #3  
Old 07-27-2005, 05:06 PM
TomCollins TomCollins is offline
Senior Member
 
Join Date: Jul 2003
Location: Austin, TX
Posts: 172
Default Re: Excel Deleting Problem

Actually, proving it is bound by n as a lower bound is easy. Every cell on the diagonal needs to be deleted, and can only be deleted if you have it in the corner of a deletion. There are n notches, therefore you must do at least n deletions.

Boo.
Reply With Quote
  #4  
Old 07-27-2005, 06:13 PM
aloiz aloiz is offline
Junior Member
 
Join Date: Feb 2004
Posts: 4
Default Re: Excel Deleting Problem

Just do a multi-select on all the X's, select delete, and then shift cells left. One deletion.


aloiz
Reply With Quote
  #5  
Old 07-27-2005, 08:25 PM
TomCollins TomCollins is offline
Senior Member
 
Join Date: Jul 2003
Location: Austin, TX
Posts: 172
Default Re: Excel Deleting Problem

Uhh, that deletes O's or you aren't explaining yourself very well.
Reply With Quote
  #6  
Old 07-27-2005, 10:36 PM
LondonBroil LondonBroil is offline
Senior Member
 
Join Date: Jan 2003
Posts: 576
Default Re: Excel Deleting Problem

Technically, you can do it all in 1 deletion by holding down CTRL and single clicking every cell, then hitting delete..once.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:33 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.